A smart diet assistant offering personalized food suggestions using ML, FastAPI, Streamlit, and ChatGPT.
CosmoFit is a smart nutrition assistant that generates personalized, healthy recipe recommendations based on user inputs such as age, gender, height, weight, activity level, and health goals.
It analyzes user profiles and food content using machine learning to support healthy eating habits, improve engagement, and enhance long-term well-being.
CosmoFit's architecture includes:
- Frontend: Streamlit app with modules for calorie, BMI, protein needs, waist-hip ratio, and more
- Backend: FastAPI server for managing user input, model communication and image handling
- Recommendation Engine: Unsupervised clustering (K-Means), classification (Random Forest), and cosine similarity
- Deployment: Dockerized setup with multi-service support (API, UI)
- Python 3.10
- scikit-learn
- pandas, numpy
- FastAPI
- Streamlit
- Docker & Docker Compose
- ChatGPT integration
- Matplotlib, seaborn (for EDA)
# Clone this repo
git clone https://github.com/ozgedoner/CosmoFit
cd CosmoFit
# Install requirements
pip install -r requirements.txt
# Start the app
streamlit run app/main.pydocker-compose up -d --buildDue to GitHub's file size limits, the dataset is not included in this repository.
You can download it from the following link and place it under the Data/ folder:
🔗 Download dataset from Google Drive