Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Recipe Generator

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.


🚀 Getting Started

Open Using Daytona

  1. Install Daytona: Follow the Daytona installation guide.

  2. Create the Workspace:

    daytona create https://github.com/anurag-b72/ai-recipe-generator
  3. Start the Application:

    uvicorn main:app --reload
    streamlit run streamlit_app.py

Prerequisites

  1. Install Dependencies:
    Ensure you have Python installed and run the following command to install the required libraries:

    pip install -r requirements.txt
  2. Set up Environment Variables:
    Create a .env file 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_key and your_gemini_key with your actual Supabase and Gemini API keys.

  3. 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
    );

Backend Setup

To start the FastAPI backend, run:

uvicorn main:app --reload

Frontend Setup

To start the Streamlit frontend, run:

streamlit run streamlit_app.py

📷 Screen Shots

Screenshot 1

Screenshot 2

Screenshot 3


✨ Features

  • 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!

About

The application allows users to upload image of ingredients, analyzes the image, and provides recipe suggestion.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages