Inspiration
We were inspired by the idea of using AI to create easy recipes from simple ingredients. We wanted to create an interactive tool that suggests recipes and links to cooking videos related to the recipes.
What it does
The recipe generator allows the user to input a list of ingredients. It uses a Chat GPT wrapper to generate multiple recipes based on those ingredients. It integrates with YouTube to provide videos that match the recipes.
How we built it
Backend: We built a Flask server in Python to integrate OpenAI API and the YouTube Data API. The backend handles recipe generation, video searches, returning JSON responses.
Frontend: Our generator.html uses JavaScript to interact with the API. Users enter the ingredients and search topic, and the frontend displays the recipe suggestions and video recommendations.
Challenges we ran into
Ensuring that GPT API returned JSON in a format that can be directly parsed. Integrating the YouTube Data API and GPT API. Coordinating fetch calls in JavaScript.
Accomplishments that we're proud of
Successfully integrating two APIs (OpenAI and YouTube) into one application. Providing users with recipe ideas and corresponding videos. Bridging Python backend with JavaScript frontend.
What we learned
Techniques for bridging backend Python code with frontend JavaScript. How to utilize Flask. Importance of error handling. Integration with APIs into our application and handling the responses.
What's next for Recipe Generator
Integrate additional cooking-related APIs additional information.
Log in or sign up for Devpost to join the conversation.