Building a Playlist Generator with Sentence Transformers
Hugging Face Blog 4 years ago
A developer built a playlist generator using Sentence Transformers to create semantic embeddings of song lyrics and Gradio to build a multi-step interface for searching. The system splits songs into verses, embeds each verse using the msmarco-MiniLM-L-6-v3 model with a maximum sequence length of 512 word pieces, and searches across pre-generated embeddings to find semantically similar songs. Users can now enter a text prompt, retrieve the nine most relevant songs through semantic search, and view the lyrics of selected results.