Unofficial code for paper: Transformer-based approach towards music emotion recognition from lyrics
- Pytorch (1.10.1+cu113)
- Numpy
- Pandas
- Tensorboard
- Transformers (3.0.0)
We used MoodyLyrcis dataset for this repo. Due to potential copyright issues, cannot share the training data.
- You have to put
train.csvandtest.csvin folder./multitask/data/. - The csv
columnswe used be like:
index,artist,song,mood,lyric
- Only need two columns:
moodandlyricin the training process. You can adjust the costom datasetmultitasks/utils/dataset.pyto fit your own dataset.
- PyTorch with CUDA-enabled GPU.
- Change hyper-parameters at file:
./multitask/config.py(Optional)
Follow these stepes to run:
cd multitasks
python main.py
Run command:
tensorboard --logdir='{log_path_you_define_at_config.py}'
