Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Rebeccca Peltz
Rebeccca Peltz

Posted on

     

Recipe Generator

Recipe Generator Code REAMDE

This is a submission for theCloudflare 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)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
mince profile image
Mince
I am currently making a game named Monsters ahead. I am a great web developer and am a decent roblox game dev. Follow me to get awesome posts to your inbox.
  • Location
    INDIA
  • Education
    India
  • Pronouns
    he
  • Work
    Just Learning
  • Joined

Sure! Here's a recipe for a cake that only uses water as an ingredient:

Water Cake Recipe

Ingredients:

  • 1 cup water

Instructions:

  1. Preheat your oven to 350°F (180°C).
  2. In a large mixing bowl, combine 1 cup of water.
  3. Stir the water until it is well-mixed.
  4. Pour the water into a greased and floured 8-inch round cake pan.
  5. Bake the cake for 30-40 minutes, or until a toothpick inserted into the center of the cake comes out clean.
  6. Remove the cake from the oven and let it cool in the pan for 5 minutes.
  7. Remove the cake from the pan and place it on a wire rack to cool completely.

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

CollapseExpand
 
rebeccapeltz profile image
Rebeccca Peltz
Application Developer
  • Location
    Seattle
  • Education
    University of Washington
  • Work
    Senior Application Developer at HDR Inc.
  • Joined

looks healthy too!

CollapseExpand
 
phalkmin profile image
Paulo Henrique
WordPress Optimization Specialist | 15+ Years of Expertise as Tech Lead, Project Manager, and Professional Solution-Maker - Platinum on all Souls games, including Sekiro
  • Location
    São Paulo, Brazil
  • Joined

Well, the cake will certainly be moist

CollapseExpand
 
maame-codes profile image
Maame Afia Fordjour
Having fun with coding.
• Edited on• Edited

This is really cool. I cook a lot, so this would be helpful! Going to steal (borrow) the code ;)

CollapseExpand
 
coderj001 profile image
Raju ghorai
I am nothing but all time devoted learner...
  • Location
    localhost
  • Joined
• Edited on• Edited

Nice

CollapseExpand
 
ranjancse profile image
Ranjan Dailata
A Professional based out of India specialized in handling AI-powered automations. Contact me at ranjancse@gmail.com, LinkedIn - https://www.linkedin.com/in/ranjan-dailata/

Looks great!

Time for introducing an AI Recipe Pattern :)

CollapseExpand
 
saulitis profile image
Peter Saulitis
  • Joined

This is awesome! Made a German chocolate cake w/ fruit :)

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Application Developer
  • Location
    Seattle
  • Education
    University of Washington
  • Work
    Senior Application Developer at HDR Inc.
  • Joined

More fromRebeccca Peltz

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp