You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,11 +64,11 @@ The architecture of the application can be split in 4 blocks:
64
64
65
65
#### Product Summary and Generative Recipe:
66
66
67
-
-**Implementation**: Using AWS Lambda for server-side logic, Amazon Bedrock as a generative artificial intelligence (GenAI) building platform, Anthropic Claude as Large Language Models (LLM) and Stable Diffusion XL from StabilityAI as diffusion model for generating images.
67
+
-**Implementation**: Using AWS Lambda for server-side logic, Amazon Bedrock as a generative artificial intelligence (GenAI) building platform, Anthropic Claude as Large Language Models (LLM) and Amazon Nova Canvas for generating images.
68
68
69
69
-**AI Model Development**: Choosing the LLM model had an impact on response quality and latency. Ultimately, we chose Anthropic Claude 3 Haiku as a good ratio between latency and quality.
70
70
71
-
-**AI-Generated Images**: Prompting for an image is very sensitive and was a challenge to generate an image that truly highlights the nutritive features of products. To craft the prompt, we used a first LLM to generate the prompt based on product nutritive features. This technique is similar to a self-querying for vector databases. Using multi-shot prompt-engineering also helped a lot to improve the quality of the prompt.
71
+
-**AI-Generated Images**: Prompting for an image is very sensitive and was a challenge to generate an image that truly highlights the nutritive features of products. To craft the prompt, we used a first LLM to generate the prompt based on product nutritive features. This technique is similar to a self-querying for vector databases. Using multi-shot prompt-engineering also helped a lot to improve the quality of the prompt. Images are generated using Amazon Nova Canvas.
72
72
73
73
74
74
@@ -164,7 +164,7 @@ Each recipe must also respect the user's dietary restrictions and allergies.
164
164
}
165
165
```
166
166
167
-
-**Image Generation**: Once we have the recipe title and description, we use Stable Diffusion to generate the image of the recipe. We generate images in parallel to reduce the latency of the response.
167
+
-**Image Generation**: Once we have the recipe title and description, we use Amazon Nova Canvas to generate the image of the recipe. We generate images in parallel to reduce the latency of the response.
168
168
169
169
170
170
@@ -193,7 +193,7 @@ The output format is a Markdown file to faciliate the display of the recipe on t
193
193
-**Challenge**: The selection of the Language Model (LM) significantly influenced both response latency and quality, posing a critical decision point.
194
194
195
195
-**Solution**: Following a comprehensive assessment of various models, we've chosen the following Anthropic Claude models for different components within the app:
-**Barcode scanning image generation**: Utilizing Amazon Nova Canvas.
197
197
-**Recipe fridge photograph food aliment detection**: Utilizing Anthropic Claude 3 Sonnet to extract food ingredients from images.
198
198
-**Recipe proposals, Product ingredients**: Leveraging Anthropic Claude 3 Sonnet. Sonnet was selected for cases where the output needed to be parsed for other tasks or displayed using HTML components.
199
199
-**Product summary, and recipe steps**: Utilizing Anthropic Claude 3 Haiku was favored for enhancing user experience by displaying results in streaming mode, and because the output was solely intended for display, enabling us to designate the output type as markdown.
@@ -242,7 +242,7 @@ The output format is a Markdown file to faciliate the display of the recipe on t
242
242
**Illustrated Use Cases of the GenAi Application**
243
243
244
244
-**Text generation** - Amazon Bedrock utilizes Anthropic Claude 3 Haiku to generate the product summary.
245
-
-**Text to image** - Amazon Bedrock utilizes Stable Diffusion XL from StabilityAI to generate an image of the product.
245
+
-**Text to image** - Amazon Bedrock utilizes Amazon Nova Canvas to generate an image of the product.
246
246
-**Image to text** - Anthropic Claude 3 Sonnet is leveraged by Amazon Bedrock to identify food elements in the image.
247
247
248
248
@@ -300,8 +300,6 @@ npm run dev
300
300
301
301
-[AWS CLI 2+](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) must be installed on the deployment machine. ([Instructions](https://nodejs.org/en/download/))
302
302
303
-
- Request access to Anthropic Claude models and Stable Diffusion XL on Amazon Bedrock
304
-
- Follow [these steps](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) to gain access to Claude and SDXL models used in this app
"text": f"Professional food photography of {prompt}, styled for cookbook, natural lighting, shallow depth of field, appetizing presentation on elegant plate, high resolution, culinary magazine quality"
0 commit comments