This repository contains a sample project for a recipe generator application built using Python, FastAPI, Streamlit, Supabase, and Gemini. The application allows users to upload images of items in their refrigerator, analyzes the images, and provides recipe suggestions.
-
Install Daytona: Follow the Daytona installation guide.
-
Create the Workspace:
daytona create https://github.com/anurag-b72/ai-recipe-generator
-
Start the Application:
uvicorn main:app --reload streamlit run streamlit_app.py
-
Install Dependencies:
Ensure you have Python installed and run the following command to install the required libraries:pip install -r requirements.txt
-
Set up Environment Variables:
Create a.envfile in the project root directory and add the following configurations:# Configure Gemini API and Supabase SUPABASE_URL = "https://example.supabase.co" SUPABASE_KEY = "your_supabase_key" GEMINI_API_KEY = "your_gemini_key"
Replace
your_supabase_keyandyour_gemini_keywith your actual Supabase and Gemini API keys. -
Set up Supabase:
Create a table in your Supabase database using the following SQL query:CREATE TABLE recipes ( id SERIAL PRIMARY KEY, file_id UUID NOT NULL, file_name TEXT NOT NULL, recipe_title TEXT NOT NULL, recipe_description TEXT NOT NULL, recipe_ingredients TEXT[] NOT NULL, recipe_making_time TEXT NOT NULL, recipe_instructions_to_make TEXT[] NOT NULL, recipe_number_of_people_servings TEXT NOT NULL );
To start the FastAPI backend, run:
uvicorn main:app --reloadTo start the Streamlit frontend, run:
streamlit run streamlit_app.py- AI-Powered Recipe Suggestions: Analyze uploaded images using Gemini to generate recipes.
- Interactive UI: Built with Streamlit for an intuitive user experience.
- Database Integration: Store recipe data in Supabase.
- Modular Architecture: Clean separation between backend and frontend.
This project demonstrates how to combine FastAPI, Streamlit, and Supabase with AI capabilities to build a practical application. Feel free to explore, modify, and enhance!


