Skip to content

Utilising the concepts of LLM from Langchain and integrating Hugging Face model and Google Gemini AI chatbot to understand emotional sentiments of lyrics and develop a pesudo-RAG that will return quotes from BTS songs

License

Notifications You must be signed in to change notification settings

HarshiniR4/Lyric_LLM_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Emotion Based Playlist Recommender Project - using Langchain

Aim:

Humble attempt at inducing more emotion-based personalization in playlist recommendation (similar to Spotify's Daylists).

So I developed a RAG using the Langchain LLMs and HuggingFaceHub model to perform sentiment analysis on BTS songs lyrics translations and suggest a playlist and set of quotes from the songs according to the user's emotions.

Streamlit Output

Libraries Required:

  • Langchain
  • NLTK
  • HuggingFaceHub
  • Streamlit
  • Beautifulsoup
  • Pandas
  • JSON

Procedure:

  1. Scrape data fromDoolset Bangtan Lyric Translations to obtain all BTS songs and their lyrics with translations
  2. Clean the scraped data and extract only the translations into a JSON
  3. Create two Langchain LLMs using the HuggingFaceHub model to perform sentimental analysis and obtain
    • emotion for every line translation for every song in the JSON
    • the overall emotion of each song
  4. Save the results in a consolidated dataset
  5. Using Streamlit obtain user input for any emotions and derive the appropriate playlist and quotes for the user based on the emotions

How to run:

Clone the repository and run the emotion_chatbot.py file using Streamlit

streamlit run emotion_chatbot.py

Streamlit Output

Furture Improvements

  • Use feedback loop mechanisms to understand user's listening patterns to decipher emotion based recommendation better
  • Develop an interactive and fun frontend

About

Utilising the concepts of LLM from Langchain and integrating Hugging Face model and Google Gemini AI chatbot to understand emotional sentiments of lyrics and develop a pesudo-RAG that will return quotes from BTS songs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published