Skip to content

Commit

Permalink
moved images from quickstart to doc/img (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
subramen authored Dec 19, 2024
2 parents 3649841 + 7fa0165 commit ed87ba4
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 28 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/img/resized_image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
56 changes: 28 additions & 28 deletions recipes/quickstart/build_with_Llama_3_2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
" plt.axis('off')\n",
" plt.show()\n",
"\n",
"display_local_image(\"images/a_colorful_llama_doing_ai_programming.jpeg\")"
"display_local_image(\"../../docs/img/a_colorful_llama_doing_ai_programming.jpeg\")"
]
},
{
Expand All @@ -441,7 +441,7 @@
" with open(image_path, \"rb\") as img:\n",
" return base64.b64encode(img.read()).decode('utf-8')\n",
"\n",
"base64_image = encode_image(\"images/a_colorful_llama_doing_ai_programming.jpeg\")"
"base64_image = encode_image(\"../../docs/img/a_colorful_llama_doing_ai_programming.jpeg\")"
]
},
{
Expand Down Expand Up @@ -525,8 +525,8 @@
}
],
"source": [
"display_local_image(\"images/grocery_shopping_bascket_with_salmon_in_package.jpeg\")\n",
"base64_image = encode_image(\"images/grocery_shopping_bascket_with_salmon_in_package.jpeg\")"
"display_local_image(\"../../docs/img/grocery_shopping_bascket_with_salmon_in_package.jpeg\")\n",
"base64_image = encode_image(\"../../docs/img/grocery_shopping_bascket_with_salmon_in_package.jpeg\")"
]
},
{
Expand Down Expand Up @@ -1066,8 +1066,8 @@
}
],
"source": [
"display_local_image(\"images/thumbnail_IMG_1329.jpg\")\n",
"img = Image.open(\"images/thumbnail_IMG_1329.jpg\")\n",
"display_local_image(\"../../docs/img/thumbnail_IMG_1329.jpg\")\n",
"img = Image.open(\"../../docs/img/thumbnail_IMG_1329.jpg\")\n",
"width, height = img.size\n",
"print(\"Image dimensions:\", width, height)"
]
Expand Down Expand Up @@ -1112,7 +1112,7 @@
" # Resize the image while maintaining aspect ratio\n",
" resized_img = img.resize((new_width, new_height))\n",
"\n",
" resized_img.save(\"images/resized_image.jpg\")\n",
" resized_img.save(\"../../docs/img/resized_image.jpg\")\n",
"\n",
" print(\"Original size:\", original_width, \"x\", original_height)\n",
" print(\"New size:\", new_width, \"x\", new_height)\n",
Expand All @@ -1121,7 +1121,7 @@
" \n",
"max_dimension = 1120\n",
"resized_img = resize_image(img)\n",
"base64_image = encode_image(\"images/resized_image.jpg\")"
"base64_image = encode_image(\"../../docs/img/resized_image.jpg\")"
]
},
{
Expand Down Expand Up @@ -1223,8 +1223,8 @@
}
],
"source": [
"display_local_image(\"images/thumbnail_IMG_6385.jpg\")\n",
"img = Image.open(\"images/thumbnail_IMG_6385.jpg\")\n",
"display_local_image(\"../../docs/img/thumbnail_IMG_6385.jpg\")\n",
"img = Image.open(\"../../docs/img/thumbnail_IMG_6385.jpg\")\n",
"width, height = img.size\n",
"print(\"Image dimensions:\", width, height)"
]
Expand All @@ -1247,7 +1247,7 @@
"source": [
"max_dimension = 1120\n",
"resized_img = resize_image(img)\n",
"base64_image = encode_image(\"images/resized_image.jpg\")"
"base64_image = encode_image(\"../../docs/img/resized_image.jpg\")"
]
},
{
Expand Down Expand Up @@ -1320,7 +1320,7 @@
}
],
"source": [
"base64_image = encode_image(\"images/resized_image.jpg\")\n",
"base64_image = encode_image(\"../../docs/img/resized_image.jpg\")\n",
"\n",
"messages = [\n",
" {\n",
Expand Down Expand Up @@ -1381,8 +1381,8 @@
}
],
"source": [
"display_local_image(\"images/meta_release.png\")\n",
"base64_image = encode_image(\"images/meta_release.png\")"
"display_local_image(\"../../docs/img/meta_release.png\")\n",
"base64_image = encode_image(\"../../docs/img/meta_release.png\")"
]
},
{
Expand Down Expand Up @@ -1448,8 +1448,8 @@
}
],
"source": [
"display_local_image(\"images/llama_stack.png\")\n",
"base64_image = encode_image(\"images/llama_stack.png\")"
"display_local_image(\"../../docs/img/llama_stack.png\")\n",
"base64_image = encode_image(\"../../docs/img/llama_stack.png\")"
]
},
{
Expand Down Expand Up @@ -1553,8 +1553,8 @@
}
],
"source": [
"display_local_image(\"images/thumbnail_IMG_1440.jpg\")\n",
"img = Image.open(\"images/thumbnail_IMG_1440.jpg\")\n",
"display_local_image(\"../../docs/img/thumbnail_IMG_1440.jpg\")\n",
"img = Image.open(\"../../docs/img/thumbnail_IMG_1440.jpg\")\n",
"width, height = img.size\n",
"print(\"Image dimensions:\", width, height)"
]
Expand All @@ -1577,7 +1577,7 @@
"source": [
"max_dimension = 1120\n",
"resized_img = resize_image(img)\n",
"base64_image = encode_image(\"images/resized_image.jpg\")"
"base64_image = encode_image(\"../../docs/img/resized_image.jpg\")"
]
},
{
Expand Down Expand Up @@ -1686,11 +1686,11 @@
}
],
"source": [
"display_local_image(\"images/thumbnail_IMG_6385.jpg\")\n",
"img = Image.open(\"images/thumbnail_IMG_6385.jpg\")\n",
"display_local_image(\"../../docs/img/thumbnail_IMG_6385.jpg\")\n",
"img = Image.open(\"../../docs/img/thumbnail_IMG_6385.jpg\")\n",
"max_dimension = 1120\n",
"resized_img = resize_image(img)\n",
"base64_image = encode_image(\"images/resized_image.jpg\")"
"base64_image = encode_image(\"../../docs/img/resized_image.jpg\")"
]
},
{
Expand Down Expand Up @@ -2488,7 +2488,7 @@
}
],
"source": [
"display_local_image(\"images/cat.jpeg\")"
"display_local_image(\"../../docs/img/cat.jpeg\")"
]
},
{
Expand Down Expand Up @@ -2626,7 +2626,7 @@
" if log is not None:\n",
" log.print()\n",
"\n",
"await run_main(\"images/cat.jpeg\",\n",
"await run_main(\"../../docs/img/cat.jpeg\",\n",
" \"What cat breed is this? Tell me in detail about the breed.\")"
]
},
Expand Down Expand Up @@ -2656,8 +2656,8 @@
}
],
"source": [
"display_local_image(\"images/gnocchi_alla_romana.jpeg\")\n",
"img = Image.open(\"images/gnocchi_alla_romana.jpeg\")\n",
"display_local_image(\"../../docs/img/gnocchi_alla_romana.jpeg\")\n",
"img = Image.open(\"../../docs/img/gnocchi_alla_romana.jpeg\")\n",
"resized_img = resize_image(img)"
]
},
Expand Down Expand Up @@ -2708,7 +2708,7 @@
}
],
"source": [
"await run_main(\"images/resized_image.jpg\",\n",
"await run_main(\"../../docs/img/resized_image.jpg\",\n",
" \"What's the name of this dish? How can I make it?\")"
]
},
Expand Down Expand Up @@ -2739,7 +2739,7 @@
"### ExecuTorch (XNNPACK framework)\n",
"In this workshop we will walk you through the end to end workflow for building an android demo app using CPU on device via XNNPACK framework.\n",
"To do so we need to follow these steps:\n",
"<img src=\"images/llama-mobile-confirmed.png\" alt=\"\" /> \n",
"<img src=\"../../docs/img/llama-mobile-confirmed.png\" alt=\"\" /> \n",
"\n",
"\n",
"For detailed explanation of each of these steps please see this [link](https://github.com/pytorch/executorch/blob/main/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md). Alternatively, you can follow this [tutorial](https://github.com/pytorch/executorch/blob/main/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md) for running Llama 3.2 lightweight models on your iOS device!"
Expand Down

0 comments on commit ed87ba4

Please sign in to comment.