This project aims to generate a personalized list of song recommendations based on user preferences regarding lyrics, genre, year, views, and title. We employ fine-tuning techniques on the Allenai Longformer model, specifically targeting song lyrics to enhance the recommendation accuracy.
For our dataset, we access song lyrics and related metadata from an external source.
Fine-tune Allenai Longformer model on English song lyrics to develop lyricsModel
.
Generate embeddings for textual data and normalize numerical data:
- Textual Embeddings: Generate from
title + genre + lyrics
usinglyricsModel
. - Numerical Features: Normalize
year
andviews
.
Concatenate all features to form the final feature set for each song.
When users provide their favorite song IDs, we create embeddings and numerical features for these songs. We then use similarity metrics to compare these features with those of all other songs in our dataset, allowing us to identify the songs that are most similar.
-
Create a Virtual Environment: Ensure that you are in the project's root directory before executing this command.
python -m venv myenv
-
Activate the Virtual Environment:
- On Windows:
myenv\Scripts\activate
- On Linux or macOS:
source myenv/bin/activate
- On Windows:
-
Install Dependencies:
python -m pip install -r requirements.txt
/data
: Stores datasets and scripts./models
: Contains model files./src
: Source code./tests
: Test scripts and test data./docs
: Documentation.
To contribute to the project, follow these steps:
-
Clone the Repository:
git clone [repository-url]
-
Navigate to the Main Branch:
git checkout main
-
Update Local Repository:
git pull
-
Create a New Branch: Replace
{type}
withfeat
for new features orfix
for bug fixes, and{name}
with a brief name describing your work.git checkout -b {type}/{name}
-
Add Changes: After making your changes, add them to the staging area.
git add .
-
Commit Changes:
git commit -m "{type}: description of your changes"
-
Push Changes: Push your branch to the remote repository, setting it as the upstream branch.
git push --set-upstream origin {type}/{name}