An AI-powered web application that detects human emotions using facial expressions and recommends music accordingly.
The Emotion Music Sentiment Analyzer uses Computer Vision and Deep Learning to recognize facial emotions in real time through a webcam and suggest suitable music.
This project is ideal for students and beginners who want hands-on experience with AI, OpenCV, Flask, and Deep Learning, while still being strong enough for resumes and interviews.
- 🎥 Real-time emotion detection using webcam
- 🧠 Deep learning model for emotion classification
- 🎶 Music recommendation based on detected emotion
- 🌐 Flask-based web interface
- 👤 Face detection using OpenCV Haar Cascade
- Python
- HTML
- CSS
- Flask
- OpenCV
- TensorFlow / Keras
- NumPy
- Haar Cascade
- Git & GitHub
Emotion-Music-Sentiment-Analyser/ │ ├── app.py ├── camera.py ├── utils.py ├── train.py ├── model.h5 ├── requirements.txt ├── haarcascade_frontalface_default.xml │ ├── songs/ │ ├── angry.csv │ ├── disgusted.csv │ ├── fearful.csv │ ├── happy.csv │ ├── neutral.csv │ ├── sad.csv │ └── surprised.csv │ ├── static/ │ └── css/ │ └── style.css │ ├── templates/ │ └── index.html │ └── README.md
git clone https://github.com/Krishn-01/Emotion-Music-Sentiment-Analyser.git
cd Emotion-Music-Sentiment-Analyser
python -m venv venv
venv\Scripts\activate
2️⃣ Create Virtual Environment (Windows)
python -m venv venv
venv\Scripts\activate
3️⃣ Install Dependencies
pip install -r requirements.txt
4️⃣ Run the Project
python app.py
🌐 Open Browser
http://127.0.0.1:5000
🧪 Sample Code
def detect_emotion(frame):
prediction = model.predict(frame)
return prediction
🔧 Git Commands Used
git init
git add .
git commit -m "Initial commit - Emotion Music Sentiment Analyzer"
git branch -M main
git push -u origin main
🚀 Future Improvements
Improve emotion detection accuracy
Spotify API integration
Cloud deployment
Mobile-responsive UI
👤 Author
Krishn Kumar Pandey
🎓 B.Tech – Information Technology
🔗 GitHub: https://github.com/Krishn-01
⭐ If you like this project, don’t forget to star the repository!