SpartanCinder
commited on
Commit
•
111474e
1
Parent(s):
b387b9d
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1 |
---
|
2 |
license: cc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: cc
|
3 |
+
datasets:
|
4 |
+
- SpartanCinder/artist-lyrics-dataset
|
5 |
+
- SpartanCinder/song-lyrics-artist-classifier
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
library_name: adapter-transformers
|
11 |
+
tags:
|
12 |
+
- music
|
13 |
+
- art
|
14 |
---
|
15 |
+
# GPT2 Pretrained Lyric Generation Model
|
16 |
+
|
17 |
+
This repository contains a pretrained GPT2 model fine-tuned for lyric generation. The model was trained using the Hugging Face's Transformers library.
|
18 |
+
|
19 |
+
## Model Details
|
20 |
+
|
21 |
+
- **Model architecture:** GPT2
|
22 |
+
- **Training data:** The datasets were created using the Genius API and are linked in the Model's tags.
|
23 |
+
- **Training duration:** [Mention how long the model was trained]
|
24 |
+
|
25 |
+
## Usage
|
26 |
+
|
27 |
+
The model can be used to generate lyrics.
|
28 |
+
It uses nucleus sampling with a probability threshold of 0.9 for generating the lyrics,
|
29 |
+
which helps in generating more diverse and less repetitive text.
|
30 |
+
|
31 |
+
Here is a basic usage example:
|
32 |
+
|
33 |
+
```python
|
34 |
+
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
35 |
+
|
36 |
+
tokenizer = GPT2Tokenizer.from_pretrained("SpartanCinder/GPT2-pretrained-lyric-generation")
|
37 |
+
model = GPT2LMHeadModel.from_pretrained("SpartanCinder/GPT2-pretrained-lyric-generation")
|
38 |
+
|
39 |
+
input_ids = tokenizer.encode("Once upon a time", return_tensors='pt')
|
40 |
+
output = model.generate(input_ids, max_length=100, num_return_sequences=5, do_sample=True, top_p=0.9)
|
41 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|