My Experiments & Learnings with Generative AI: How I Built an App that Generates Recipes
Ramesh Vijayaraghavan ????
Tech Builder | Innovation Craftsman | Success Enabler
Hi everyone, I am excited to share with you my latest project and learnings: Simpl Cooking, a web app that can generate recipes based on ingredients, cuisine, and dietary preferences. In this article, I will tell you how I built this app using generative AI, a type of artificial intelligence technology that can generate text, images, code or other types of content, often in response to a prompt entered by a user.
??The Inspiration
The idea for Simpl Cooking came from my own passion for cooking and experimenting with different dishes. I wanted to create a tool that could help me and other people discover new recipes and cuisines, as well as cater to different dietary needs and preferences. I also wanted to make the tool fun and easy to use, so that anyone could generate a recipe with just a few clicks.
But more importantly, I wanted to learn more about generative AI and its capabilities and limitations. I was fascinated by the concept of generative AI and how it could produce original and diverse content based on user input. I wanted to experiment with generative AI and see what kind of content it could generate and how it could enhance my creativity and productivity.
??The Technology behind it
To build Simpl Cooking, I used OpenAI GPT-3.5 Turbo model, which is a state-of-the-art foundation model for natural language generation. This model can generate high-quality and relevant text based on user input, such as ingredients, cuisine, and dietary preferences.
One of the learnings from my experiment was that the model can also generate JSON adhering to a given schema, which is useful for creating structured data, such as recipe steps, ingredients & cuisine. This feature allowed me to create more detailed and informative recipes that could be easily parsed and displayed on the web app.
I built the web app with Remix, a web framework for React, which allows me to create fast and interactive web pages with minimal code. I used Tailwind, a utility-first CSS framework, to style the app and make it responsive and beautiful. I hosted the app on Cloudflare Pages, a platform for fast and secure web hosting. I took advantage of edge computing, which is a way of delivering computation and storage closer to the geographically distributed users enabling faster apps.
Another feature that I added to the web app was the header images that change based on the cuisine of the recipe and are generated by Dall E, a generative AI model that can create images from text descriptions, using Bing image creator, a tool that can search and combine images from Bing. This feature makes the app more attractive and dynamic, as well as showcases the power and diversity of generative AI.
???The Challenges
One of the main challenges I faced while building Simpl Cooking was the response time of the GPT-3.5 Turbo model. The model takes some time to generate the text, which can affect the user experience and satisfaction. To solve this problem, I decided to cache the output of the model in a Cloudflare D1 database, which is a serverless SQL database and is designed to be fast and scalable. This way, I can store the generated recipes and retrieve them quickly when needed.
Another challenge I faced was the quality and ethics of the generated content. The model is not perfect and may produce inaccurate or misleading content if the input is vague or incomplete. The model may also generate content that is inappropriate or offensive for some users. To address this issue, I added a disclaimer on the app that informs the users that the content is generated by an AI model and may not be accurate or suitable for everyone.
??The Results
I launched Simpl Cooking a few weeks ago and I am happy to say that the app has received positive feedback and reviews from the users. The app has generated 100s of recipes so far, covering a wide range of ingredients, cuisines, and dietary preferences. The users have praised the app for its creativity, simplicity, accuracy and usefulness.
Here are some examples of the recipes generated by Simpl Cooking:
?? Try it yourself: Simpl Cooking.
??The Future
I am very proud of what I have achieved with Simpl Cooking, but I know that there is still room for improvement and innovation. I plan to continue working on the app and adding new features and functionalities, such as:
I hope that Simpl Cooking can inspire and help more people to enjoy cooking and discover new dishes and cuisines. I also hope that Simpl Cooking can demonstrate the potential and possibilities of generative AI for content creation.
Thank you for reading this article and for your support. I encourage you to try the generated recipes and post them on social media and tag me, so that I can see your feedback and results. If you have any questions, comments, or suggestions, please feel free to contact me or leave a comment below. I would love to hear from you. ??
#GenerativeAI #GPT3.5Turbo #SimplCooking #Remix #DallE #CloudflarePages #CloudFlareD1 #EdgeComputing #Innovation
Visionary IT & Data Analytics Leader with 20+ Years of Transformational Impact | Expert in Data Management & Advanced Analytics | Strategist in Banking & Supply Chain Digitalization
1 年Great going Ramesh!
Senior Engineer @Tiger Analytics | Ex-Publicis Sapient | Ex- NTT DATA
1 年Hi Ramesh, I read your article it provides lot of information about AI integration with React and cloudflare for application hosting, I was struggle to host my some of application and AI integration along with it and I found some new ideas from your article thanks Ramesh Vijayaraghavan ????