Deployed Link : https://chibihime.github.io/Meal-Rec/
Gohan is an ingredient-based meal recommendation system that helps users discover recipes using ingredients already available in their kitchen. The system uses unsupervised machine learning techniques to cluster recipes and generate recommendations based on ingredient similarity.
The project combines:
- Natural Language Processing (NLP)
- Unsupervised Machine Learning
- Dimensionality Reduction
- Similarity Search
- Full-stack deployment using FastAPI and GitHub Pages
The frontend provides a minimal anime-inspired user experience, while the backend performs clustering and similarity-based recommendation retrieval.
Many users struggle with deciding what meals to prepare using ingredients they already possess. Existing recipe platforms often:
- Require exact ingredient matches
- Prioritize keyword search over semantic similarity
- Provide overwhelming or irrelevant recipe suggestions
- Depend heavily on manual filtering
This project addresses these limitations by building an ingredient-driven recommendation engine capable of:
- Understanding ingredient similarity
- Grouping recipes into meaningful clusters
- Returning recipes closely aligned with user input
- Supporting flexible ingredient combinations
The goal is to reduce food decision fatigue while improving recipe discoverability and reducing ingredient waste.
- HTML
- CSS
- Vanilla JavaScript
- GitHub Pages
- FastAPI
- Uvicorn
- Render
- Scikit-learn
- Pandas
- NumPy
- Joblib
- TF-IDF Vectorization
- Truncated SVD
- KMeans Clustering
- Cosine Similarity
The system uses a recipe dataset containing:
- Recipe titles
- Ingredient lists
- Cooking instructions
- Recipe image metadata
| Feature | Description |
|---|---|
| Title | Recipe name |
| Ingredients | Raw ingredient list |
| Cleaned_Ingredients | Preprocessed ingredient text |
| Instructions | Cooking steps |
| Image_Name | Associated recipe image |
| Cluster | Assigned recipe cluster |
The dataset undergoes:
- Ingredient cleaning and normalization
- Text preprocessing
- TF-IDF feature extraction
- Dimensionality reduction using SVD
- Unsupervised clustering using KMeans
Ingredients are converted into numerical representations using TF-IDF vectorization.
Truncated SVD is used to reduce sparse TF-IDF vectors into lower-dimensional latent representations.
KMeans clustering groups recipes into ingredient similarity clusters.
For a given user query:
- Input ingredients are vectorized
- Cluster is predicted
- Candidate recipes are filtered from that cluster
- Cosine similarity ranks recipes
- Top-K recipes are returned
https://gohan-backend.onrender.com
GET /Response:
{
"message": "Meal Recommendation API Running"
}POST /recommend{
"ingredients": "mushroom garlic",
"top_k": 5
}{
"cluster": 2,
"recipes": [...],
"scores": [...]
}- Ingredient-based recipe retrieval
- Cluster-aware recommendation filtering
- Similarity-based ranking
- Real-time API inference
- Frontend-backend deployment integration
- Static image serving
The system successfully:
- Identifies recipes using semantically similar ingredients
- Produces relevant meal suggestions
- Handles flexible ingredient combinations
- Returns ranked recommendations with similarity scores
- Limited personalization
- No nutritional optimization
- No user feedback learning loop
- Clustering quality depends on preprocessing
- Ingredient synonym handling can be improved
- Add semantic embeddings
- Introduce transformer-based retrieval
- Improve ingredient synonym matching
- Add nutritional analysis
- Support multilingual ingredients
- Add user preference learning
- Add meal filtering (vegan, gluten-free, etc.)
Hosted using GitHub Pages.
Hosted using Render.
Stored using serialized .pkl files:
cluster_model.pklvectorizer.pklsvd.pklclustered_data.pkl
Input:
mushroom garlic onion
System Process:
- Ingredients vectorized
- Reduced using SVD
- Cluster predicted
- Recipes filtered within cluster
- Similarity scores computed
- Top recipes returned
Output:
- Garlic Confit
- Mushroom Pasta
- Garlic Herb Rice
- Creamy Mushroom Soup
This project demonstrates practical applications of:
- Unsupervised learning
- NLP pipelines
- Recommendation systems
- Information retrieval
- Similarity search
- Production ML deployment
- API engineering
- Full-stack ML integration
Prutha Annadate
Interests:
- Artificial Intelligence
- Recommendation Systems
- NLP
- Healthcare AI
- Sustainability-focused ML
GitHub: https://github.com/chibihime
