Skip to content

Commit

Permalink
Merge pull request #3 from Kubus42/wise2024
Browse files Browse the repository at this point in the history
updated project slides
  • Loading branch information
Kubus42 authored Dec 17, 2024
2 parents dfae64e + 2c46d80 commit 64dcc4b
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 26 deletions.
6 changes: 3 additions & 3 deletions _freeze/slides/about/projects/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"hash": "c3bcfdfc309eb51ec2147a0578f5090c",
"hash": "a3eb00a1f8ce6b581f7b187f14be9641",
"result": {
"engine": "jupyter",
"markdown": "---\ntitle: \"Projects: Large Language Models\"\nformat: \n revealjs:\n theme: default\n chalkboard: true\n footer: \"Seminar: LLM, WiSe 2024/25\"\n logo: ../../assets/logo.svg\n---\n\n\n\n\n# How to develop an app with a language model: DEMO\n\n\n# Project ideas\n\n## Question-Answering Chatbot \nBuild a chatbot that can answer questions posed by users on a specific topic provided in form of documents. Users input their questions, the chatbot retrieves relevant information from a pre-defined set of documents, and uses the information to answer the question.\n\n## Document tagging / classification \nUse GPT and its tools (e.g., function calls) and/or embeddings to classify documents or assign tags to them. Example: Sort bug reports or complaints into categories depending on the problem.\n\n## Clustering of text-based entities \nCreate a small tool that can cluster text-based entities based on embeddings, for example, groups of texts or keywords. Example: Structure a folder of text files based on their content.\n\n## Text-based RPG Game\nDevelop a text-based role-playing game where players interact with characters and navigate through a story generated by GPT. Players make choices that influence the direction of the narrative.\n\n## Sentiment Analysis Tool\nBuild an app that analyzes the sentiment of text inputs (e.g., social media posts, customer reviews) using GPT. Users can input text, and the app provides insights into the overall sentiment expressed in the text.\n\n## Text Summarization Tool \nCreate an application that summarizes long blocks of text into shorter, concise summaries. Users can input articles, essays, or documents, and the tool generates a summarized version.\n\n## Language Translation Tool \nBuild a simple translation app that utilizes GPT to translate text between different languages. Users can input text in one language, and the app outputs the translated text in the desired language. Has to include some nice tweaks.\n\n## Personalized Recipe Generator \nDevelop an app that generates personalized recipes based on user preferences and dietary restrictions. Users input their preferred ingredients and dietary needs, and the app generates custom recipes using GPT.\n\n## Lyrics Generator \nCreate a lyrics generation tool that generates lyrics based on user input such as themes, music style, emotions, or keywords. Users can explore different poetic styles and themes generated by GPT.\n\n# How to build you app\n\n## Tools \n\n- You can use everything in the Jupyterlab (put `pip list` in a terminal to see all Python packages)\n- If there are specific packages you need, we can organize them\n- You can simply build your application in a Jupyter notebook!\n- Or: Use **Dash**!\n\n\n## Dash \nPut the following files into your home in the Jupyterlab: \n\n`my_layout.py`\n\n::: {#79cec5a7 .cell execution_count=1}\n``` {.python .cell-code}\nfrom dash import html\nfrom dash import dcc\n\n\nlayout = html.Div([\n html.H1(\"Yeay, my app!\"),\n html.Div([\n html.Label(\"Enter your text:\"),\n dcc.Input(id='input-text', type='text', value=''),\n html.Button('Submit', id='submit-btn', n_clicks=0),\n ]),\n html.Div(id='output-container-button')\n])\n```\n:::\n\n\n--- \n\n`my_callbacks.py`\n\n::: {#b52e73be .cell execution_count=2}\n``` {.python .cell-code}\nfrom dash.dependencies import (\n Input, \n Output\n)\nfrom dash import html\n\n\ndef register_callbacks(app):\n @app.callback(\n Output('output-container-button', 'children'),\n [Input('submit-btn', 'n_clicks')],\n [Input('input-text', 'value')]\n )\n def update_output(n_clicks, input_value):\n if n_clicks > 0:\n return html.Div([\n html.Label(\"You entered:\"),\n html.P(input_value)\n ])\n else:\n return ''\n\n```\n:::\n\n\n--- \n\nNow you can run your own app in the Jupyterlab here: \n\n![MyApp Launcher](../../assets/my_app.png)\n\n",
"markdown": "---\ntitle: \"Projects: Large Language Models\"\nformat: \n revealjs:\n theme: default\n chalkboard: true\n footer: \"Seminar: LLM, WiSe 2024/25\"\n logo: ../../assets/logo.svg\n---\n\n\n## What is the idea of the project phase?\n\n- Combine the theoretical knowledge about LLMs with a practical application\n- Embed an LLM into a business use case \n- Explore the possibilities of LLMs (which are not restricted to chats bots!)\n\n\n## Project phase schedule\n- Project ideation \n- Team building \n- Work on projects in teams \n- Project presentation\n- Reflections & Summary\n\n## What your presentation should include (Part 1)\n\n- **General**:\n - What is your prototype? What can it do?\n - How did you (technically) solve it?\n - Why/where is a language model needed here?\n\n## What your presentation should include (Part 2)\n- **Business**:\n - What could be a business case for your prototype, or where can it be applied?\n - Who would be the main stakeholder of your application?\n - What would be similar use cases to what you have done? Where would such a tool be needed?\n\n## What your presentation should include (Part 3)\n- **Learnings**:\n - What has been the biggest challenge(s) in your project?\n - What do you think has been the greatest learning?\n - Which techniques from the seminar did you use?\n\n\n## What your summary should include (Part 1) \n\n- 2-3 pages in total\n- What is your prototype? What can I do?\n- What could be a business case for your prototype, or where can it be applied? Who would be the main stakeholder of your application?\n- Where in your prototype do you need GPT/a language model and why?\n\n\n## What your summary should include (Part 2)\n- What are current limitations/challenges of your prototype and how could you (potentially) overcome them? Can you imagine challenges for your prototype in production?\n- What have been your main learnings during the creation of your prototype (and/or) the seminar itself? Which of the techniques presented in the seminar did you use?\n\n\n# Project ideas\n\n## Question-Answering Chatbot \nBuild a chatbot that can answer questions posed by users on a specific topic provided in form of documents. Users input their questions, the chatbot retrieves relevant information from a pre-defined set of documents, and uses the information to answer the question.\n\n## Document tagging / classification \nUse GPT and its tools (e.g., function calls) and/or embeddings to classify documents or assign tags to them. Example: Sort bug reports or complaints into categories depending on the problem.\n\n## Clustering of text-based entities \nCreate a small tool that can cluster text-based entities based on embeddings, for example, groups of texts or keywords. Example: Structure a folder of text files based on their content.\n\n## Text-based RPG Game\nDevelop a text-based role-playing game where players interact with characters and navigate through a story generated by GPT. Players make choices that influence the direction of the narrative.\n\n## Sentiment Analysis Tool\nBuild an app that analyzes the sentiment of text inputs (e.g., social media posts, customer reviews) using GPT. Users can input text, and the app provides insights into the overall sentiment expressed in the text.\n\n## Text Summarization Tool \nCreate an application that summarizes long blocks of text into shorter, concise summaries. Users can input articles, essays, or documents, and the tool generates a summarized version.\n\n## Language Translation Tool \nBuild a simple translation app that utilizes GPT to translate text between different languages. Users can input text in one language, and the app outputs the translated text in the desired language. Has to include some nice tweaks.\n\n## Personalized Recipe Generator \nDevelop an app that generates personalized recipes based on user preferences and dietary restrictions. Users input their preferred ingredients and dietary needs, and the app generates custom recipes using GPT.\n\n## Lyrics Generator \nCreate a lyrics generation tool that generates lyrics based on user input such as themes, music style, emotions, or keywords. Users can explore different poetic styles and themes generated by GPT.\n\n# How to build you app\n\n## Tools \n\n- You can use everything in the Jupyterlab (put `pip list` in a terminal to see all Python packages)\n- If there are specific packages you need, we can organize them\n- You can simply build your application in a Jupyter notebook!\n- Or: Use **Dash**!\n\n\n## Dash \nPut the following files into your home in the Jupyterlab: \n\n`my_layout.py`\n\n::: {#ebf749fd .cell execution_count=1}\n``` {.python .cell-code}\nfrom dash import html\nfrom dash import dcc\n\n\nlayout = html.Div([\n html.H1(\"Yeay, my app!\"),\n html.Div([\n html.Label(\"Enter your text:\"),\n dcc.Input(id='input-text', type='text', value=''),\n html.Button('Submit', id='submit-btn', n_clicks=0),\n ]),\n html.Div(id='output-container-button')\n])\n```\n:::\n\n\n--- \n\n`my_callbacks.py`\n\n::: {#1d493a64 .cell execution_count=2}\n``` {.python .cell-code}\nfrom dash.dependencies import (\n Input, \n Output\n)\nfrom dash import html\n\n\ndef register_callbacks(app):\n @app.callback(\n Output('output-container-button', 'children'),\n [Input('submit-btn', 'n_clicks')],\n [Input('input-text', 'value')]\n )\n def update_output(n_clicks, input_value):\n if n_clicks > 0:\n return html.Div([\n html.Label(\"You entered:\"),\n html.P(input_value)\n ])\n else:\n return ''\n\n```\n:::\n\n\n--- \n\nNow you can run your own app in the Jupyterlab here: \n\n![MyApp Launcher](../../assets/my_app.png)\n\n",
"supporting": [
"projects_files/figure-revealjs"
"projects_files"
],
"filters": [],
"includes": {}
Expand Down
12 changes: 6 additions & 6 deletions docs/python_intro/exercises/conditional_statements.html
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ <h2 class="anchored" data-anchor-id="exercise-1-check-word-presence">Exercise 1:
<summary>
Show solution
</summary>
<div id="cell-3" class="cell" data-execution_count="7">
<div id="cell-3" class="cell" data-execution_count="13">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>text <span class="op">=</span> <span class="st">"Natural language processing is fascinating."</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="st">"language"</span> <span class="kw">in</span> text:</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">"The word 'language' is present in the text."</span>)</span>
Expand Down Expand Up @@ -538,7 +538,7 @@ <h2 class="anchored" data-anchor-id="exercise-2-classify-text-length">Exercise 2
<summary>
Show solution
</summary>
<div id="cell-7" class="cell" data-execution_count="8">
<div id="cell-7" class="cell" data-execution_count="14">
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>text <span class="op">=</span> <span class="st">"Natural language processing."</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>length <span class="op">=</span> <span class="bu">len</span>(text)</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a></span>
Expand Down Expand Up @@ -566,7 +566,7 @@ <h2 class="anchored" data-anchor-id="exercise-3-check-for-uppercase">Exercise 3:
<summary>
Show solution
</summary>
<div id="cell-11" class="cell" data-execution_count="9">
<div id="cell-11" class="cell" data-execution_count="15">
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>sentence <span class="op">=</span> <span class="st">"Hello, world!"</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> sentence[<span class="dv">0</span>].isupper():</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">"The sentence starts with an uppercase letter."</span>)</span>
Expand All @@ -591,7 +591,7 @@ <h2 class="anchored" data-anchor-id="exercise-4-check-palindrome">Exercise 4: Ch
<summary>
Show solution
</summary>
<div id="cell-14" class="cell" data-execution_count="10">
<div id="cell-14" class="cell" data-execution_count="16">
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> is_palindrome(word):</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> word <span class="op">==</span> word[::<span class="op">-</span><span class="dv">1</span>]</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a></span>
Expand Down Expand Up @@ -623,7 +623,7 @@ <h2 class="anchored" data-anchor-id="exercise-5-categorize-word-length">Exercise
<summary>
Show solution
</summary>
<div id="cell-18" class="cell" data-execution_count="11">
<div id="cell-18" class="cell" data-execution_count="17">
<div class="sourceCode cell-code" id="cb9"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> categorize_word_length(word):</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> length <span class="op">=</span> <span class="bu">len</span>(word)</span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a> </span>
Expand Down Expand Up @@ -659,7 +659,7 @@ <h2 class="anchored" data-anchor-id="exercise-6-grade-classification">Exercise 6
<summary>
Show solution
</summary>
<div id="cell-21" class="cell" data-execution_count="12">
<div id="cell-21" class="cell" data-execution_count="18">
<div class="sourceCode cell-code" id="cb10"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> grade_classification(score):</span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="dv">90</span> <span class="op">&lt;=</span> score <span class="op">&lt;=</span> <span class="dv">100</span>:</span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="st">"A"</span></span>
Expand Down
8 changes: 4 additions & 4 deletions docs/python_intro/exercises/data_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ <h2 class="anchored" data-anchor-id="exercise-1-greeting-message">Exercise 1: Gr
<summary>
Show solution
</summary>
<div id="cell-3" class="cell" data-execution_count="11">
<div id="cell-3" class="cell" data-execution_count="1">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>name <span class="op">=</span> <span class="st">"Alice"</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Combine to create a greeting message</span></span>
Expand All @@ -537,7 +537,7 @@ <h2 class="anchored" data-anchor-id="exercise-2-word-count">Exercise 2: Word Cou
<summary>
Show solution
</summary>
<div id="cell-8" class="cell" data-execution_count="12">
<div id="cell-8" class="cell" data-execution_count="2">
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>sentence <span class="op">=</span> <span class="st">"Natural Language Processing is fun"</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Split the sentence into words</span></span>
Expand Down Expand Up @@ -566,7 +566,7 @@ <h2 class="anchored" data-anchor-id="exercise-3-create-a-simple-list">Exercise 3
<summary>
Show solution
</summary>
<div id="cell-12" class="cell" data-execution_count="13">
<div id="cell-12" class="cell" data-execution_count="3">
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create a list of favorite fruits</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>fruits <span class="op">=</span> [<span class="st">"apple"</span>, <span class="st">"banana"</span>, <span class="st">"cherry"</span>]</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a></span>
Expand All @@ -592,7 +592,7 @@ <h2 class="anchored" data-anchor-id="exercise-4-check-if-word-is-present">Exerci
<summary>
Show solution
</summary>
<div id="cell-16" class="cell" data-execution_count="14">
<div id="cell-16" class="cell" data-execution_count="4">
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>nlp_words <span class="op">=</span> [<span class="st">"token"</span>, <span class="st">"entity"</span>, <span class="st">"vector"</span>, <span class="st">"model"</span>]</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>search_word <span class="op">=</span> <span class="st">"entity"</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a></span>
Expand Down
Loading

0 comments on commit 64dcc4b

Please sign in to comment.