Mood Melody is a web application that recommends music based on your detected mood. Using your webcam, the app captures your image, analyzes your facial expressions with a machine learning model to determine your emotion, and then suggests songs that match your vibe. Finally, you can groove to the recommended tunes using the Spotify API!
- 💻 Open Mood Melody in your browser.
- 📷 Grant access to your webcam.
- 🤔 The app captures your image and sends it to our emotion detection service.
- :magic: Our service analyzes your facial expression and determines your emotion.
- 🎶 Based on your emotion, the app recommends a playlist or a selection of songs.
- 🎧 Enjoy the music using the Spotify API!
Frontend:
- React: A JavaScript library for building user interfaces.
- Tailwind CSS: A utility-first CSS framework for rapid UI development.
- @react-three/fiber: A React renderer for Three.js.
- react-webcam: A React component for capturing images from a webcam.
- axios: A promise-based HTTP client for making requests to the backend.
- 🐍 Backend:
- Python: The backend is built using Python.
- Machine Learning: A machine learning model is used to detect the user's emotion from their image.
- Flask: A micro web framework for Python.
- :spotify: API:
- Spotify API: Used to play the recommended songs.
Mood Melody is composed of two main components:
- Frontend: Developed with React and styled with Tailwind CSS, the frontend uses
react-webcamto access your webcam and capture your image.axiosis used to communicate with the backend emotion detection service and retrieve song recommendations. - Backend: The Python-based backend service employs machine learning techniques to analyze your image and detect your emotion. It then returns the detected emotion along with a curated list of songs.
- Clone the repository:
git clone https://github.com/rakcoder/Music.git - Install the dependencies:
npm install(for the frontend) andpip install -r requirements.txt(for the backend). - Start the application: Follow the instructions in the
README.mdfiles of theemotion-music-app(frontend) andpython-emotion-service(backend) directories.
- Open Mood Melody in your browser.
- Allow the application to access your webcam.
- The application will capture your image and recommend songs based on your detected emotion.
- Enjoy the music!
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE.md file for details.