This project is a personalized music recommendation system that integrates machine learning models with the Spotify API to provide tailored music recommendations and playlist management. Built as a user-friendly web application using Streamlit, the system allows users to discover new music and organize playlists seamlessly.
For a detailed breakdown of this project, please refer to the full report in this PDF file.
Video Presentation: https://www.youtube.com/watch?v=biaQ1d6yNmo
-
Integration with Spotify API
Users can log in with their Spotify accounts to access personalized recommendations and manage playlists directly in their library. -
Tailored Music Recommendations
Generate song suggestions based on moods or similarity to user-selected tracks using pre-trained machine learning models. -
Playlist Management
Create or update Spotify playlists with recommended songs in just a few clicks. -
Interactive Web Application
Built using Streamlit for a clean and intuitive user interface. -
Secure Authentication
Utilizes Spotipy and OAuth2 for secure user authentication and token management. -
Scalable Deployment
Hosted on Streamlit Cloud for easy accessibility and reliable performance.
Ensure you have the following installed:
- Python 3.11
- Spotify Developer Account (to generate API credentials)
-
Clone the repository:
git clone https://github.com/gabriel-ferreira-life/Spotify-Data-Project.git
-
Install dependencies:
pip install -r requirements.txt
-
Set up your Spotify Developer credentials:
- Create an app on the Spotify Developer Dashboard.
- Add your Client ID, Client Secret, and Redirect URI to a
.toml
file:[spotify] client_id = "your_client_id" client_secret = "your_client_secret" redirect_uri = "your_redirect_uri"
- Place this
.toml
file in a.streamlit
folder at the root of your project. - Make sure to include
.streamlit/secrets.toml
in your.gitignore
file to keep it secure.
-
Run the Application
Start the Streamlit app:streamlit run app.py
-
Authenticate with Spotify
- Log in with your Spotify account when prompted.
- Authorize the app to access your Spotify data.
-
Discover Music
- Choose a recommendation method: similarity-based or mood-based.
- Explore suggested tracks and create playlists in your Spotify library.
- Programming Language: Python
- Framework: Streamlit
- API Client: Spotipy
- Machine for Recommendation: Pre-trained clustering and similarity models
- Deployment: Streamlit Cloud