|
@@ -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\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -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\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -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\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -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)"
|
|
|
]
|
|
@@ -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",
|
|
@@ -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\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -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)"
|
|
|
]
|
|
@@ -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\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -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",
|
|
@@ -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\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -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\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -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)"
|
|
|
]
|
|
@@ -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\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -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\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -2488,7 +2488,7 @@
|
|
|
}
|
|
|
],
|
|
|
"source": [
|
|
|
- "display_local_image(\"images/cat.jpeg\")"
|
|
|
+ "display_local_image(\"../../docs/img/cat.jpeg\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -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.\")"
|
|
|
]
|
|
|
},
|
|
@@ -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)"
|
|
|
]
|
|
|
},
|
|
@@ -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?\")"
|
|
|
]
|
|
|
},
|
|
@@ -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!"
|