This is a submission for the Cloudflare AI Challenge.
What I Built
Looking up a recipe on the web can take a lot longer than you would link. The ingredients and the instructions are often buried in a blog with a lot of ads popping up throughout.
In this application, using Cloudflare models for text and image generation, you can ask for a recipe based on a food category and a description. The food category is used to enhance the prompt, instead of just allowing an open ended text input for the user to describe the recipe they are looking for.
Demo
https://recipe-generator.rebeccapeltz.workers.dev/
My Code
https://github.com/rebeccapeltz/recipe-generator
Journey
I've been frustrated with Recipe websites, so I'm using Cloudflare AI Web Workers to generate recipes. You no longer need to read a blog and close obstructing ads to get to the recipe. The recipe can be printed without having to make a lot of decisions about what to print.
I was inspired by an early submission: Story and Image Generator
I set my code up a little differently, but I'm using the same AI models as the story generator.
I wanted to make the prompt a little more structured so I'm having the user choose a category and then add a description. I could enhance this by adding more categories. I wanted to get away from a open ended prompt.
Multiple Models and/or Triple Task Types
Im using "@hf/thebloke/llama-2-13b-chat-awq" for the recipe and "@cf/bytedance/stable-diffusion-xl-lightning" to generate the image of the what the recipe will prepare.
Top comments (7)
Sure! Here's a recipe for a cake that only uses water as an ingredient:
Water Cake Recipe
Ingredients:
Instructions:
That's it! This cake is a simple and moist dessert that is perfect for anyone looking for a low-ingredient, low-calorie treat. The water provides the necessary moisture for the cake to bake and gives it a light, tender texture. Enjoy!
AI IS MAD 😡
just for fun 😊
This is an excellent example
looks healthy too!
Well, the cake will certainly be moist
This is really cool. I cook a lot, so this would be helpful! Going to steal (borrow) the code ;)
Nice
Looks great!
Time for introducing an AI Recipe Pattern :)
This is awesome! Made a German chocolate cake w/ fruit :)