diff --git a/week2/community-contributions/Airlines_Chatbot_with_Audio_Input.ipynb b/week2/community-contributions/Airlines_Chatbot_with_Audio_Input.ipynb
index e9c80e5..4b18a89 100644
--- a/week2/community-contributions/Airlines_Chatbot_with_Audio_Input.ipynb
+++ b/week2/community-contributions/Airlines_Chatbot_with_Audio_Input.ipynb
@@ -5,22 +5,12 @@
"id": "d006b2ea-9dfe-49c7-88a9-a5a0775185fd",
"metadata": {},
"source": [
- "# Additional End of week Exercise - week 2\n",
- "\n",
- "Now use everything you've learned from Week 2 to build a full prototype for the technical question/answerer you built in Week 1 Exercise.\n",
- "\n",
- "This should include a Gradio UI, streaming, use of the system prompt to add expertise, and the ability to switch between models. Bonus points if you can demonstrate use of a tool!\n",
- "\n",
- "If you feel bold, see if you can add audio input so you can talk to it, and have it respond with audio. ChatGPT or Claude can help you, or email me if you have questions.\n",
- "\n",
- "I will publish a full solution here soon - unless someone beats me to it...\n",
- "\n",
- "There are so many commercial applications for this, from a language tutor, to a company onboarding solution, to a companion AI to a course (like this one!) I can't wait to see your results."
+ "# Project to take Audio Input to the Airlines ChatBot"
]
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": null,
"id": "a07e7793-b8f5-44f4-aded-5562f633271a",
"metadata": {},
"outputs": [],
@@ -40,18 +30,10 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": null,
"id": "9e2315a3-f80c-4d3f-8073-f5b61d709564",
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "OpenAI API Key exists and begins sk-proj-\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"# Initialization\n",
"\n",
@@ -69,7 +51,7 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": null,
"id": "40da9de1-b350-49de-8acd-052f40ce5611",
"metadata": {},
"outputs": [],
@@ -81,7 +63,7 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": null,
"id": "5537635c-a60d-4983-8018-375c6a912e19",
"metadata": {},
"outputs": [],
@@ -98,7 +80,7 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": null,
"id": "c7132dd0-8788-4885-a415-d59664f68fd8",
"metadata": {},
"outputs": [],
@@ -124,7 +106,7 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": null,
"id": "7703ca0c-5da4-4641-bcb1-7727d1b2f2bf",
"metadata": {},
"outputs": [],
@@ -136,7 +118,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": null,
"id": "29ce724b-d998-4c3f-bc40-6b8576c0fd34",
"metadata": {},
"outputs": [],
@@ -158,7 +140,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": null,
"id": "931d0565-b01d-4aa8-bd18-72bafff8fb3b",
"metadata": {},
"outputs": [],
@@ -178,28 +160,10 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": null,
"id": "fa165f7f-9796-4513-b923-2fa0b0b9ddd8",
"metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "\n",
- " \n",
- " "
- ],
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"import base64\n",
"from io import BytesIO\n",
@@ -225,7 +189,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": null,
"id": "b512d4ff-0f7b-4148-b161-4ee0ebf14776",
"metadata": {},
"outputs": [],
@@ -241,7 +205,7 @@
},
{
"cell_type": "code",
- "execution_count": 47,
+ "execution_count": null,
"id": "c3852570-fb26-4507-a001-f50fd94b7655",
"metadata": {},
"outputs": [],
@@ -260,7 +224,7 @@
},
{
"cell_type": "code",
- "execution_count": 48,
+ "execution_count": null,
"id": "3d75abc2-870e-48af-a8fe-8dd463418b3d",
"metadata": {},
"outputs": [],
@@ -276,8 +240,7 @@
" response, city = handle_tool_call(message)\n",
" messages.append(message)\n",
" messages.append(response)\n",
- " image = None\n",
- " # image = artist(city)\n",
+ " image = artist(city)\n",
" response = openai.chat.completions.create(model=MODEL, messages=messages)\n",
" \n",
" reply = response.choices[0].message.content\n",
@@ -291,64 +254,10 @@
},
{
"cell_type": "code",
- "execution_count": 50,
+ "execution_count": null,
"id": "512fec09-c2f7-4847-817b-bc20f8b30319",
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "* Running on local URL: http://127.0.0.1:7880\n",
- "\n",
- "To create a public link, set `share=True` in `launch()`.\n"
- ]
- },
- {
- "data": {
- "text/html": [
- ""
- ],
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/plain": []
- },
- "execution_count": 50,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Tool get_ticket_price called for London\n"
- ]
- },
- {
- "data": {
- "text/html": [
- "\n",
- " \n",
- " "
- ],
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"# More involved Gradio code as we're not using the preset Chat interface!\n",
"# Passing in inbrowser=True in the last line will cause a Gradio window to pop up immediately.\n",