https://github.com/fm1320/song-vibe
AI song recommendations based on the feel of a song
https://github.com/fm1320/song-vibe
embeddings-similarity faiss llms sentence-transformers vector-search-engine
Last synced: 3 months ago
JSON representation
AI song recommendations based on the feel of a song
- Host: GitHub
- URL: https://github.com/fm1320/song-vibe
- Owner: fm1320
- License: mit
- Created: 2023-07-14T13:18:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-30T15:52:04.000Z (over 1 year ago)
- Last Synced: 2024-07-04T01:31:37.210Z (over 1 year ago)
- Topics: embeddings-similarity, faiss, llms, sentence-transformers, vector-search-engine
- Language: Python
- Homepage: https://mood-music.streamlit.app/
- Size: 5.88 MB
- Stars: 18
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
🎶 Song vibe 🎶

#### *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](https://www.youtube.com/watch?v=WIBtZa7mcCs&t=26s&ab_channel=Qdrant-VectorDatabase%26SearchEngine)
## Technical detailsA 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.## Installation
Follow the instructions below to run the Streamlit server locally.
### Pre-requisites
Make sure you have Python 3.10 and Poetry installed.
### Steps
1. Clone the repository
```bash
git clone https://github.com/fm1320/song-vibe
cd song-vibe
```2. Install dependencies from requirements file
```bash
poetry install
```3. (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 running `train.py` the song descriptions are encoded by a transformer network and a vector index file `index.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!
4. Run the Streamlit server
```bash
poetry run streamlit run app.py
```
Open http://localhost:8501 in your browser to access the app.## Tech Stack
- User Interface - [Streamlit](https://streamlit.io/)
- Index search - [FAISS](https://github.com/facebookresearch/faiss)
- Sentence Transformers - [SBERT](https://www.sbert.net/)## Roadmap
- *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## Contributing
All contributions are welcome!
## License
Free to use, star, share, and acknowledge use if you can!