Skip to content

About

NutriChef AI uses a fine-tuned transformer to generate structured recipes from prompts. It extracts ingredients to estimate nutritional values via API integration. The system showcases a full ML pipeline from fine-tuning to a functional UI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🍳 Nutri-Chef-AI

Transform any ingredients into gourmet recipes with the power of Generative AI.

GitHub Repository FastAPI Python 3.10+


Overview

Nutri-Chef-AI is an advanced Generative AI application that bridges the gap between machine learning and culinary arts. Utilizing state-of-the-art Large Language Models (LLMs) and Vision AI, the platform empowers users to craft personalized, highly structured recipes based on available ingredients.

The application goes beyond simple generation: it automatically estimates nutritional information, discovers cover images, and curates a rich experience allowing users to manage a personal cookbook and share creations with the community. It showcases a full ML pipeline—from fine-tuned generation to a production-ready API and front-end interface.

✨ Key Features

  • 🪄 AI Recipe Generator: Simply enter the ingredients you have on hand, and let the AI craft a tailored recipe complete with step-by-step instructions and a full nutritional breakdown.
  • 📸 Fridge Mode (Vision AI): Upload a photo of your fridge or pantry. The integrated Vision AI pipeline detects available ingredients automatically and generates personalized recipes in seconds.
  • 📝 Write Your Own Recipe: Input hand-crafted recipes, and the system will automatically fetch nutritional data and an appealing cover image for you.
  • 🌍 Community Recipes: Discover, save, and interact with what food enthusiasts around the globe are cooking.
  • 📖 Personalized Cookbook: All your generated and saved recipes are securely stored in one beautifully formatted, searchable personal collection.

Technology Stack

Backend

  • Framework: FastAPI (Python 3.x)
  • AI/ML: LangChain, Groq API for lightning-fast inference, Computer Vision.
  • Database: PostgreSQL via SQLAlchemy & asyncpg
  • Authentication: bcrypt, custom auth mechanisms.

Frontend

  • Vanilla HTML/CSS/JavaScript

Deployment & CI/CD

  • Containerization: Docker
  • CI/CD: GitHub Actions
  • Hosting: Railway (Backend), Vercel (Front-end Demo)

🚀 Getting Started

Prerequisites

  • Python 3.10+
  • PostgreSQL database running locally
  • Groq API key
  • Optional: Tesseract / OCR support if you want to run Fridge Mode locally

1) Open the project folder

cd D:\Nutri-Chef-AI

2) Activate the virtual environment

If the project already has a local environment, use it:

.\env\Scripts\activate

If you do not have the environment yet, create one:

python -m venv env
.\env\Scripts\activate

3) Install dependencies

pip install -r requirements.txt

4) Create a .env file

Create a file named .env in the project root and add values like:

DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/nutrichefdb
GROQ_API_KEY=your_groq_api_key
PORT=8000
  1. Run the Backend Server:

    python main.py

    The backend will start at http://localhost:8000. You can test the API by accessing the Swagger UI at http://localhost:8000/docs.

  2. Run the Frontend (Optional for standalone testing): Simply open the frontend/index.html file in your preferred web browser, or serve it using tools like Live Server.

📁 Project Structure

Nutri-Chef-AI/
├── database/         # Database connection and schema definitions (SQLAlchemy)
├── frontend/         # Contains the User Interface (HTML/CSS/JS)
├── routes/           # FastAPI application routes (Auth, Generator, Community)
├── services/         # Core business logic and AI orchestration
├── utils/            # Helper functions and loggers
├── config/           # Application configuration
├── main.py           # FastAPI entry point
├── Dockerfile        # Containerization configurations
└── requirements.txt  # Python dependency list

📄 License

This project is open-source and available under the terms of the project's LICENSE.

About

NutriChef AI uses a fine-tuned transformer to generate structured recipes from prompts. It extracts ingredients to estimate nutritional values via API integration. The system showcases a full ML pipeline from fine-tuning to a functional UI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages