Browse Source

Minor updates

pull/123/head
Edward Donner 3 months ago
parent
commit
95c38ce9f3
  1. 2
      week1/day2 EXERCISE.ipynb
  2. 2
      week1/day5.ipynb
  3. 8
      week2/day1.ipynb
  4. 22
      week2/day3.ipynb
  5. 2
      week7/day2.ipynb
  6. 2
      week7/day3 and 4.ipynb
  7. 2
      week7/day5.ipynb

2
week1/day2 EXERCISE.ipynb

@ -216,7 +216,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "402d5686-4e76-4110-b65a-b3906c35c0a4",
"id": "6de38216-6d1c-48c4-877b-86d403f4e0f8",
"metadata": {},
"outputs": [],
"source": []

2
week1/day5.ipynb

@ -334,7 +334,7 @@
"metadata": {},
"outputs": [],
"source": [
"create_brochure(\"HuggingFace\", \"https://huggingface.com\")"
"create_brochure(\"HuggingFace\", \"https://huggingface.co\")"
]
},
{

8
week2/day1.ipynb

@ -272,7 +272,7 @@
"# Also adding max_tokens\n",
"\n",
"message = claude.messages.create(\n",
" model=\"claude-3-5-sonnet-20240620\",\n",
" model=\"claude-3-5-sonnet-latest\",\n",
" max_tokens=200,\n",
" temperature=0.7,\n",
" system=system_message,\n",
@ -295,7 +295,7 @@
"# Now let's add in streaming back results\n",
"\n",
"result = claude.messages.stream(\n",
" model=\"claude-3-5-sonnet-20240620\",\n",
" model=\"claude-3-5-sonnet-latest\",\n",
" max_tokens=200,\n",
" temperature=0.7,\n",
" system=system_message,\n",
@ -321,7 +321,7 @@
"# If that happens to you, please skip this cell and use the next cell instead - an alternative approach.\n",
"\n",
"gemini = google.generativeai.GenerativeModel(\n",
" model_name='gemini-1.5-flash',\n",
" model_name='gemini-2.0-flash-exp',\n",
" system_instruction=system_message\n",
")\n",
"response = gemini.generate_content(user_prompt)\n",
@ -344,7 +344,7 @@
")\n",
"\n",
"response = gemini_via_openai_client.chat.completions.create(\n",
" model=\"gemini-1.5-flash\",\n",
" model=\"gemini-2.0-flash-exp\",\n",
" messages=prompts\n",
")\n",
"print(response.choices[0].message.content)"

22
week2/day3.ipynb

@ -136,26 +136,6 @@
" yield response"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "40a2d5ad-e907-465e-8397-3120583a5bf9",
"metadata": {},
"outputs": [],
"source": [
"!pip show gradio"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a7fed1b9-c502-4eea-b649-ca00458d5c45",
"metadata": {},
"outputs": [],
"source": [
"# 5.8.0 to 5.12"
]
},
{
"cell_type": "markdown",
"id": "1334422a-808f-4147-9c4c-57d63d9780d0",
@ -171,7 +151,7 @@
"metadata": {},
"outputs": [],
"source": [
"gr.ChatInterface(fn=chat, type=\"messages\").launch(pwa=True)"
"gr.ChatInterface(fn=chat, type=\"messages\").launch()"
]
},
{

2
week7/day2.ipynb

@ -31,7 +31,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
"version": "3.11.11"
}
},
"nbformat": 4,

2
week7/day3 and 4.ipynb

@ -31,7 +31,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
"version": "3.11.11"
}
},
"nbformat": 4,

2
week7/day5.ipynb

@ -31,7 +31,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
"version": "3.11.11"
}
},
"nbformat": 4,

Loading…
Cancel
Save