This project uses the Spotify Web API and a simple AI model to recommend songs similar to those you already love. It fetches your top tracks, analyzes their audio features, and finds others that match your musical taste using cosine similarity.
- π Spotify OAuth login to access your top tracks
- π Uses audio features like energy, valence, and danceability
- π§ AI-powered recommendations using cosine similarity
- π Flask web interface that displays song recommendations as clickable Spotify links
- Python
- Flask (for web interface)
- Spotipy (Spotify Web API wrapper)
- Pandas, NumPy
- Scikit-learn (for scaling and similarity calculations)
git clone https://github.com/yourusername/spotify-ai-recommender.git
cd spotify-ai-recommender
pip install -r requirements.txt
Go to the Spotify Developer Dashboard and: Click Create an App Set Redirect URI to: http://localhost:5000/callback Copy your Client ID and Client Secret
Open app.py and replace:
SPOTIPY_CLIENT_ID = 'your_client_id'
SPOTIPY_CLIENT_SECRET = 'your_client_secret'
app.secret_key = 'your_secret_key'
python app.py
and then go to your browser and go to
http://localhost:5000