This is a tool that gives song recommendations based on vibes and moods. Sometimes the music and playlists we hear don't "hit" our vibe, so we are using AI to try to change that.
Find a deep dive and overview of the project in this YouTube video
A dataset of songs and their descriptions of moods and vibes is generated by promoting an LLM. Each song's vibe is encoded using a transformer model and saved as a vector index. Then this vector index is queried by similarity using the vector embedding of the user's input and the top 10 matches are returned.
Follow the instructions below to run the Streamlit server locally.
Make sure you have Python 3.10 and Poetry installed.
- Clone the repository
git clone https://github.com/fm1320/song-vibe
cd song-vibe
- Install dependencies from requirements file
poetry install
- (For Training a new index) The file
data.csv
is an example of what the training data of song descriptions looks like. This training data has been synthetically generated by prompting an LLM. By runningtrain.py
the song descriptions are encoded by a transformer network and a vector index fileindex.bin
using FAISS is created. Currenlty a flat index is used.
Note: Make sure data is formatted properly if you are going to use your own dataset!
- Run the Streamlit server
poetry run streamlit run app.py
Open http://localhost:8501 in your browser to access the app.
- coming soon: Full web app using Spotify API and more songs
- Support and add more synthetic song descriptions
- Support for more transformer encoders and indices
All contributions are welcome!
Free to use, star, share, and acknowledge use if you can!