An AI-powered Streamlit web application that recommends songs based on a user’s emotional state using NLP emotion detection and Spotify–YouTube metadata.
This project leverages Hugging Face emotion analysis, intelligent genre mapping, and a visually appealing Streamlit interface to personalize music recommendations.
- 🧠 Emotion Detection: Uses Hugging Face model
rubert-tiny2-cedr-emotion-detectionto analyze user input text. - 🎵 Smart Recommendations: Maps emotions like joy, sadness, anger, and love to suitable music genres.
- 🎧 Spotify + YouTube Dataset: Suggests real-world tracks with direct YouTube play links.
- 💬 Interactive Streamlit UI: Simple and responsive interface with a custom CSS theme.
- ⚡ Fast and Optimized: Uses Streamlit caching for efficient data and API handling.
| Category | Technologies |
|---|---|
| Frontend/UI | Streamlit, HTML/CSS |
| Backend | Python, Hugging Face Inference API |
| Data Handling | Pandas |
| Dataset | Spotify + YouTube Metadata |
| Environment Management | python-dotenv |
| APIs | Hugging Face API |
Emotion-Based-Music-Recommender/ app.py extract.py model.py spotify_plus_youtube.csv requirements.txt .env README.md
💡 Note:
Add your Hugging Face API token in the .env file like this:
# 1️⃣ Install dependencies
pip install -r requirements.txt
# 2️⃣ Run the Streamlit app
streamlit run app.py