How tejmanthena/mood-based-music-recommendation-system works
This is a Streamlit emotion-based music recommender. The user triggers webcam scanning; OpenCV detects faces, a CNN classifies expressions, and the app aggregates detected emotions to sample matching tracks from the CSV and render linked recommendations. The graph captures the main runtime stages and the model/data assets. Evidence is limited to the README and the excerpted app.py; external services are not shown as runtime dependencies.
Main entry points: app.py Streamlit UI · model.h5 CNN weights · haarcascade_frontalface_default.xml Haar cascade · muse_v3.csv Track catalog
Components 12
Emotion capture
- Webcam
- Face detection
app.py - Emotion CNN
app.py - CNN weights
model.h5 - Emotion aggregation
app.py - Haar cascade
haarcascade_frontalface_default.xml
Music recommendation
- Track catalog
muse_v3.csv - Emotion sampling
app.py - Song recommendations
app.py
Streamlit interface
- App workflow
app.py - Streamlit UI
app.py
Other components
- User
Connections 12
- User → Streamlit UI: starts scan
app.py - Streamlit UI → Webcam: reads frames
app.py - Streamlit UI → Face detection: detects faces
app.py - Face detection → Haar cascade: loads classifier
app.py - Face detection → Emotion CNN: passes face crop
app.py - Emotion CNN → CNN weights: loads weights
app.py - Emotion CNN → Emotion aggregation: returns predictions
app.py - Streamlit UI → Emotion aggregation: aggregates detections
app.py - Streamlit UI → Emotion sampling: requests tracks
app.py - Emotion sampling → Track catalog: samples tracks
app.py - Emotion sampling → Song recommendations: returns tracks
app.py - Streamlit UI → Song recommendations: renders links
app.py