How harishchaudhary-dev/smart-food-recommender works
This is a food recommender with parallel Streamlit and CLI entry points. Each loads the food dataset, builds a content-based k-NN model, profiles a user request using category, goal, diet and text preferences, then presents nearest-food results. The README documents the shared text, categorical and nutrient feature strategy; the sampled code shows both implementations inline rather than as shared modules.
Main entry points: app.py Streamlit dashboard · main.py CLI runner · food.csv Food dataset
Components 13
User interfaces
- Streamlit dashboard
app.py - CLI runner
main.py - Recommendation cards
app.py - Printed recommendations
main.py
Recommendation engine
- Web query profiling
app.py - CLI query profiling
main.py - Web feature preprocessing
app.py - CLI feature preprocessing
main.py - Web k-NN search
app.py - CLI k-NN search
main.py
Food data
- Food dataset
food.csv
Other components
- Web user
- CLI user
Connections 18
- Web user → Streamlit dashboard: sets preferences
- CLI user → CLI runner: answers prompts
- Streamlit dashboard → Food dataset: loads
- CLI runner → Food dataset: loads
- Streamlit dashboard → Web feature preprocessing: fits features
- CLI runner → CLI feature preprocessing: fits features
- Streamlit dashboard → Web query profiling: profiles query
- CLI runner → CLI query profiling: profiles query
- Web query profiling → Web feature preprocessing: transforms query
- CLI query profiling → CLI feature preprocessing: transforms query
- Streamlit dashboard → Web k-NN search: fits model
- CLI runner → CLI k-NN search: fits model
- Streamlit dashboard → Web k-NN search: searches neighbors
- CLI runner → CLI k-NN search: searches neighbors
- Web k-NN search → Recommendation cards: returns indices
- CLI k-NN search → Printed recommendations: returns indices
- Food dataset → Recommendation cards: provides food rows
- Food dataset → Printed recommendations: provides food rows