Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Streamlit app that uses an XGBoost and Spark to predict the country of origin of songs.

This project aims to predict the country of origin for a song based on its features. We use a machine learning model trained on a dataset containing various song attributes.

How It Works ๐Ÿ› ๏ธ

  • Data: We used a HuggingFace dataset containing song features (check out the link for information on what does each feature mean), and a MusicBrainz dataset containing country information of artists.
  • Feature Engineering: We processed the data to obtain the country of origin for each song whose artist's country was known.
  • Model Training: We trained an XGBoost model to predict the country of origin based on song features.
  • Inference: Once the model was trained, all songs (those with known artist country and those without) were saved without the country of origin. When a song is searched, the model predicts the country of origin based on the song features (no matter if the artist's country is known or not) and the 3 countries with the highest probability are shown.
  • Explainability: We provide SHAP values to explain the model's decisions.
  • Accuracy: The model has an accuracy of 70% on the test set.

How to run notebooks ๐Ÿ““

  1. Clone the repository
git clone https://github.com/FerranAD/songmap.git
cd songmap
  1. Install the requirements (Python 3.10.13 as used in the project)
pip install -r requirements.txt

How to deploy web app ๐Ÿš€

  1. Clone the repository
git clone https://github.com/FerranAD/songmap.git
cd songmap
  1. Run docker compose ๐Ÿ‹
docker compose up

About

Want to know where your favorite song is from? ๐ŸŒ

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages