This repository contains a Recipe Chatbot that allows users to upload images of ingredients, detect the ingredients, and generate recipes based on them using AI models like YOLO for image detection and Ollama LLM for recipe generation.
LLVIS_FRUITS_AND_VEGETABLES
├── Backend
│ ├── Recipe_Chatbot/ # Virtual environment folder
│ ├── uploads/ # Folder to save uploaded images
│ ├── runs/ # YOLO runs folder
│ ├── main.py # FastAPI server
│ ├── requirements.txt # Python dependencies
│ ├── yolo_fruits_and_vegetables_v8x.pt # YOLO model weights
├── recipe-maker
│ ├── node_modules/ # React dependencies
│ ├── public/ # Static assets
│ ├── src/ # React source code
│ │ ├── App.js # Main React component
│ │ ├── App.css # Styles
│ │ ├── index.js # Entry point for React
│ │ ├── chef-avatar.png # Chatbot avatar
│ │ ├── user-avatar.png # User avatar
│ │ ├── 2.png, 7.11.png # Additional assets
│ ├── package.json # React dependencies
│ ├── package-lock.json # Lockfile for dependencies
├── README.md # Documentation
- Image Upload: Detects ingredients in images using YOLO.
- Recipe Generation: Generates recipes based on detected ingredients using Ollama LLM.
- Chatbot: Interactive chatbot to assist users with culinary questions.
- Create a virtual environment:
python -m venv Recipe_Chatbot source Recipe_Chatbot/bin/activate # On Windows: Recipe_Chatbot\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Start the Ollama LLM model:
ollama run llama3.2:1b
- Start the server:
uvicorn main:app --reload
- Open
http://127.0.0.1:8000/docs
to explore the API documentation.
- Upload images via drag-and-drop or file upload.
- Displays detected ingredients and allows manual edits.
- Real-time chat with a recipe chatbot.
- Dynamic recipe generation with incremental updates.
- Navigate to the
recipe-maker
directory:cd recipe-maker
- Install dependencies:
npm install
- Start the development server:
npm start
- Open
http://localhost:3000
in your browser.
- Method: POST
- Description: Uploads an image and detects ingredients using YOLO.
- Response:
{ "file_id": "unique-id", "ingredients": ["tomato", "onion"] }
- Method: POST
- Description: Generates a recipe based on the provided ingredients.
- Request:
{ "ingredients": ["tomato", "onion"] }
- Response:
{ "recipe": "Detailed recipe text here." }
- Method: POST
- Description: Responds to user queries in a culinary context.
- Request:
{ "query": "How to prepare tomato soup?" }
- Response:
{ "response": "Step-by-step instructions for tomato soup." }
- FastAPI: Web framework for API development.
- YOLO: Object detection for ingredient recognition.
- Ollama LLM: AI model for natural language processing.
- React: UI development.
- Material-UI: Component library for styling.
- Add more fine-tuned AI models for better recipe generation.
- Enhance ingredient detection accuracy.
- Add support for multiple languages.
Copyright (c) 2025, Alok Ahirrao
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.
You may use and modify this project for personal or educational purposes, but commercial use is prohibited without explicit permission.
For more details, see the LICENSE file or contact [email protected] .
Happy Cooking!