File size: 3,747 Bytes
64efc66
 
39a47ba
3141fe9
39a47ba
 
 
 
 
1b9cb8e
3141fe9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64efc66
39a47ba
 
 
 
 
ef131d2
033a08e
39a47ba
 
 
033a08e
39a47ba
 
8ee9908
 
 
 
 
 
 
 
 
 
 
39a47ba
 
 
 
 
 
 
3141fe9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
license: cc-by-nc-4.0
datasets:
- Veucci/lyric-to-3genre
language:
- en
library_name: transformers
tags:
- music
widget:
- text: >-
    When I'm away from you, I'm happier than ever Wish I could explain it better
    I wish it wasn't true Give me a day or two to think of something clever To
    write myself a letter To tell me what to do, mm-mmm Do you read my
    interviews? Or do you skip my avenue? (My avenue) When you (when you) said
    you were passing through Was I even on your way? I knew when I asked you to
    (when I asked you to) Be cool about what I was telling you You'd do the
    opposite of what you said you'd do (what you said you'd do) And I'd end up
    more afraid Don't say it isn't fair You clearly weren't aware that you made
    me miserable So if you really wanna know
  example_title: (Pop) Happier Than Ever - Billie Eilish
- text: >-
    Look, I was gonna go easy on you and not to hurt your feelings But I'm only
    going to get this one chance (six minutes, six minutes) Something's wrong, I
    can feel it (six minutes, six minutes, Slim Shady, you're on) Just a feeling
    I've got, like something's about to happen, but I don't know what If that
    means what I think it means, we're in trouble, big trouble And if he is as
    bananas as you say, I'm not taking any chances You are just what the doctor
    ordered I'm beginning to feel like a Rap God, Rap God All my people from the
    front to the back nod, back nod Now who thinks their arms are long enough to
    slap box, slap box? They said I rap like a robot, so call me Rapbot
  example_title: (Hip-Hop) Rap God - Eminem
- text: >-
    Come as you are, as you were As I want you to be As a friend, as a friend As
    an old enemy Take your time, hurry up Choice is yours, don't be late Take a
    rest as a friend As an old Memoria, memoria Memoria, memoria Come doused in
    mud, soaked in bleach As I want you to be As a trend, as a friend As an old
    Memoria, memoria Memoria, memoria
  example_title: (Rock) Come as You Are - Nirvana
---

# Lyrics Genre Classification Model

## Description

The model was trained using the BERT language model on my [song lyrics dataset](https://huggingface.co/datasets/Veucci/lyrics_3genre) to predict the genre of a given song based on its lyrics. This repository houses the machine learning model, which is capable of making predictions in three distinct genres: Pop, Rock, and Hip-Hop.
For training and test codes check out [Github page](https://github.com/Veucci/lyrics-to-genre-lite).

## Dataset

The model was trained on a diverse and labeled dataset of song lyrics, which contained approximately 3000 rows. The dataset was carefully curated to include songs from a wide range of artists and genres, ensuring a comprehensive representation of Pop, Rock, and Hip-Hop music.
[DATASET](https://huggingface.co/datasets/Veucci/lyrics_3genre)

## Quick Start

```py
from transformers import pipeline

classifier = pipeline("text-classification", model="Veucci/lyrics-to-genre")
result = classifier("When I'm away from you, I'm happier than ever Wish I could explain it better I wish it wasn't true")

print(result)
```

## License

This dataset is released under the Creative Commons Attribution-NonCommercial license. This means that you are not allowed to use the dataset for commercial purposes. For detailed information about the license, please refer to the [LICENSE](./LICENSE) file.

## Contact

If you have any questions, suggestions, or concerns regarding this dataset, please feel free to reach out to email at [[email protected]](mailto:[email protected]).
I hope this model helps in your genre classification tasks and inspires further exploration of song lyrics analysis!