Skip to content

Commit

Permalink
Merge pull request #114 from softchris/move-images
Browse files Browse the repository at this point in the history
Move images
  • Loading branch information
leestott authored Nov 6, 2023
2 parents eb35d1a + 52635ed commit fbe9302
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 50 deletions.
10 changes: 5 additions & 5 deletions 09-building-image-applications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ As part of this lesson, we will continue to work with our startup, Edu4All, in t

Here's what Edu4All's students could generate for example if they're working in class on monuments:

![Edu4All startup, class on monuments, Eiffel Tower](startup.png)
![Edu4All startup, class on monuments, Eiffel Tower](./images/startup.png)

using a prompt like

Expand Down Expand Up @@ -282,11 +282,11 @@ Let's look at an example of how temperature works, by running this prompt twice:

> Prompt : "Bunny on horse, holding a lollipop, on a foggy meadow where it grows daffodils"

![Bunny on a horse holding a lollipop, version 1](./v1-generated_image.png)
![Bunny on a horse holding a lollipop, version 1](./images/v1-generated_image.png)

Now let's run that same prompt just to see that we won't get the same image twice:

![Generated image of bunny on horse](./v2-generated_image.png)
![Generated image of bunny on horse](./images/v2-generated_image.png)

As you can see, the images are similar, but not the same. Let's try changing the temperature value to 0.1 and see what happens:

Expand Down Expand Up @@ -315,8 +315,8 @@ generation_response = openai.Image.create(

Now when you run this code, you get these two images:

- ![Temperature 0, v1](./v1-0temp-generated_image.png)
- ![Temperature 0 , v2](./v2-0temp-generated_image.png)
- ![Temperature 0, v1](./images/v1-0temp-generated_image.png)
- ![Temperature 0 , v2](./images/v2-0temp-generated_image.png)

Here you can clearly see how the images resemble each other more.

Expand Down
Empty file.
File renamed without changes
49 changes: 4 additions & 45 deletions 09-building-image-applications/notebook-azureopenai.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"\n",
"Here's what Edu4All's students could generate for example if they're working in class on monuments:\n",
"\n",
"![Edu4All startup, class on monuments, Eifel Tower](startup.png)\n",
"![Edu4All startup, class on monuments, Eifel Tower](./images/startup.png)\n",
"\n",
"using a prompt like \n",
"\n",
"> \"Dog next to Eifel Tower in early morning sunlight\"\n",
"> \"Dog next to Eiffel Tower in early morning sunlight\"\n",
"\n",
"## What is DALL-E and Midjourney? \n",
"\n",
Expand Down Expand Up @@ -120,54 +120,13 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"'source' is not recognized as an internal or external command,\n",
"operable program or batch file.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: python-dotenv in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (0.20.0)\n",
"Requirement already satisfied: openai in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (0.28.1)\n",
"Requirement already satisfied: pillow in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (9.5.0)\n",
"Requirement already satisfied: requests in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (2.31.0)\n",
"Requirement already satisfied: tqdm in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from openai) (4.66.1)\n",
"Requirement already satisfied: aiohttp in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from openai) (3.8.6)\n",
"Requirement already satisfied: idna<4,>=2.5 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from requests) (3.3)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from requests) (2.0.3)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from requests) (3.1.0)\n",
"Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from requests) (2023.5.7)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from aiohttp->openai) (6.0.4)\n",
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from aiohttp->openai) (4.0.3)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from aiohttp->openai) (1.9.2)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from aiohttp->openai) (1.3.1)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from aiohttp->openai) (1.4.0)\n",
"Requirement already satisfied: attrs>=17.3.0 in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from aiohttp->openai) (23.1.0)\n",
"Requirement already satisfied: colorama in c:\\users\\chnoring\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\\localcache\\local-packages\\python310\\site-packages (from tqdm->openai) (0.4.5)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"[notice] A new release of pip is available: 23.0.1 -> 23.3.1\n",
"[notice] To update, run: C:\\Users\\chnoring\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\python.exe -m pip install --upgrade pip\n"
]
}
],
"outputs": [],
"source": [
"# create virtual env\n",
"! python3 -m venv venv\n",
Expand Down

0 comments on commit fbe9302

Please sign in to comment.