This project is a FastAPI-based Smart Recipe Generator that predicts ingredients from an image and generates corresponding recipes using AI models.
Project Link : https://lovable-ai-kitchen-86.vercel.app/
Documentation Link : https://drive.google.com/file/d/1yrFwGbryCQxLNUiKycNl9DKE_n4vTpfg/view?usp=sharing
- Upload food images and extract ingredients using AI.
- Generate recipes automatically using a generative AI model.
- RESTful API built with FastAPI.
- Interactive API documentation with Swagger UI.
- Modular code structure (API, Services, Models, etc).
- Backend: Python, FastAPI, Uvicorn
- AI Models: CLIP / ResNet for image feature extraction, Llama / GPT for text generation
- Environment: Virtual Environment (venv)
- Package Manager: pip
Follow the steps below to set up and run the project:
git clone https://github.com/yourusername/SmartRecipeGenerator.git
cd SmartRecipeGeneratorpython -m venv venv
venv\Scripts\activate
source venv/bin/activate
pip install -r requirements.txt
If you encounter ModuleNotFoundError, manually install the missing package:
pip install fastapi uvicorn fireworks-ai pillow torch torchvision transformers
uvicorn main:app --reload
👉 http://127.0.0.1:8000
If you face errors like missing modules:
pip install -r requirements.txt
To deactivate the virtual environment:
deactivate
If you face issues related to fireworks.client:
pip install fireworks-ai
cd recipeGen-main
venv\Scripts\activate
uvicorn main:app --reload
📁 Click to expand the copyable version
recipeGen-main/ │ ├── api/ │ ├── init.py │ ├── api.py │ └── endpoints/ │ ├── image.py │ ├── generative.py │ ├── recipes_kaggle.py │ └── image_generation.py │ ├── crud/ │ ├── init.py │ └── crud_recipe.py │ ├── db/ │ ├── init.py │ └── mongodb.py │ ├── models/ │ └── init.py │ ├── services/ │ ├── init.py │ └── imgGen.py │ ├── main.py ├── requirements.txt └── README.mdAdd multilingual recipe generation Enable nutritional value prediction Enhance image-to-ingredient accuracy Add voice-based recipe instructions
This project demonstrates how AI can assist in food recognition and recipe generation through an efficient and explainable pipeline using FastAPI and deep learning models.