How nishigandhachoudhury/spotify_clustering works
This repository trains Spotify-song clusters in a Colab-style notebook and serves them through a Streamlit music-discovery app. The training workflow cleans audio features, scales them, fits KMeans, and exports artifacts; the app loads those artifacts and clustered data so users can explore a mood prediction, visualizations, dataset summaries, and cluster insights. The notebook also documents PCA and t-SNE analysis. Source excerpts are partial, so app links are limited to relationships shown there or documented in the README.
Main entry points: app.py Streamlit app · spotify_clustering.py Feature scaling · clustered_songs.csv Clustered songs · kmeans_model.pkl Model and scaler
Components 14
Model training
- Training workflow
spotify_clustering.py - Feature cleaning
spotify_clustering.py - Feature scaling
spotify_clustering.py - KMeans fitting
spotify_clustering.py - PCA and t-SNE
spotify_clustering.py
Model artifacts
- Clustered songs
clustered_songs.csv - Model and scaler
kmeans_model.pkl
Discovery app
- Streamlit app
app.py - Mood prediction
app.py - Cluster visualizations
app.py - Dataset overview
app.py - Cluster insights
app.py
Other components
- Kaggle songs
- Music explorer
Connections 14
- Kaggle songs → Training workflow: downloads dataset
spotify_clustering.py - Training workflow → Feature cleaning: cleans features
spotify_clustering.py - Feature cleaning → Feature scaling: scales features
spotify_clustering.py - Feature scaling → KMeans fitting: fits clusters
spotify_clustering.py - Feature scaling → PCA and t-SNE: projects features
spotify_clustering.py - KMeans fitting → Clustered songs: writes labels
spotify_clustering.py - KMeans fitting → Model and scaler: saves model
spotify_clustering.py - Music explorer → Streamlit app: adjusts sliders
app.py - Streamlit app → Model and scaler: loads artifacts
app.py - Streamlit app → Clustered songs: loads songs
app.py - Streamlit app → Mood prediction: predicts mood
app.py - Streamlit app → Cluster visualizations: renders views
README.md - Streamlit app → Dataset overview: shows dataset
app.py - Streamlit app → Cluster insights: shows insights
app.py