MoodFuel is an AI-powered coffee strength recommender that suggests the ideal caffeine intensity based on your mood, stress, and sleep pattern — built using FastAPI, scikit-learn, Docker, and Streamlit.
It’s a learning-oriented, open-source project demonstrating an end-to-end MLOps pipeline — from model training to deployment. API Endpoint : https://moodfuel-api.onrender.com/ Streamlit App : https://moodfuel.onrender.com
MoodFuel intelligently recommends your coffee strength on a 1–10 scale using data like:
- 😴 Sleep duration
- 😤 Stress level
- 🕒 Time of day
- 💻 Workload intensity
It demonstrates machine learning integration with FastAPI, full CI/CD automation, and modern frontends (Streamlit & Gradio) for interactivity.
- FastAPI backend serving ML predictions
- Streamlit dashboard for user interaction
- Gradio demo interface for ML visualization
- CI/CD automation via GitHub Actions
- Containerized deployment with Docker
- Cloud deployment supported (Render)
├── .gitignore
├── app
├── __init__.py
├── __pycache__
│ ├── main.cpython-312.pyc
│ ├── schema.cpython-312.pyc
│ └── __init__.cpython-312.pyc
├── schema.py
├── main.py
├── gradio_ui.py
└── dashboard.py
├── model
└── model.pkl
├── requirements.txt
├── deploy
└── .dockerignore
├── tests
└── test_app.py
├── Dockerfile
├── data
├── DataGenerator.py
└── coffee_strength_dataset.csv
├── .github
└── workflows
│ └── ci.yml
└── train_model.py
- Python 3.10
- pip or conda
- Docker
- GitHub account (for CI/CD setup)
git clone https://github.com/SamIeer/MoodFuel.git
cd MoodFuelpip install -r deploy/requirements.txt
python train_model.py
uvicorn app.main:app --reload
Visit http://127.0.0.1:8000/docs
Streamlit Dashboard
streamlit run app/dashboard.py
Gradio Demo
python app/gradio_ui.py
🐳 Docker Deployment Build Docker Image bash Copy code
docker build -t moodfuel-api .
Run Container
docker run -d -p 8000:8000 moodfuel-api
Access your app at:
- ☁️ Cloud Deployment (Render)
- Push your project to GitHub.
- Go to Render
- Create a New Web Service → connect GitHub repo.
- Select Docker environment → deploy.
- Your live AAP will be available at:
- https://moodfuel.onrender.com
CI/CD automatically runs these tests on every push (see .github/workflows/ci.yml).
Contributions are welcome! To get started, follow these steps:
1️⃣ Create a New Branch
git checkout -b feature/your-feature-name
2️⃣ Make Your Changes
✔ Follow PEP 8 style guidelines ✔ Add clear comments and docstrings ✔ Keep your code readable and consistent
3️⃣ Run Tests
pytest -v
4️⃣ Commit & Push
git add .
git commit -m "Add new feature"
git push origin feature/your-feature-name
5️⃣ Submit a Pull Request
Open a Pull Request from your branch into the main branch and describe your changes clearly.
👤 Sameer Chauhan
- GitHub: SamIeer
- LinkedIn: Sameer Chauhan
- Email: sameerchauhan212204@gmail.com
