File size: 1,095 Bytes
8222fce b335913 8222fce a887209 2ce6772 ebf967e 2ce6772 be52108 2ce6772 079b3a0 2ce6772 b335913 |
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 |
---
library_name: transformers
tags:
- music
- lyrics
- generation
datasets:
- smgriffin/24thankyou-lyrics
language:
- en
base_model:
- openai-community/gpt2
pipeline_tag: text-generation
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
Midwest indie band 24thankyou lyrics generator, finetuned from gpt2.
## How to Use
You can use the following code to generate lyrics:
```python
from transformers import GPT2LMHeadModel, GPT2Tokenizer, pipeline
# load model
model_name = "smgriffin/24thankyou-lyrics-generator"
model = GPT2LMHeadModel.from_pretrained(model_name)
tokenizer = GPT2Tokenizer.from_pretrained(model_name)
# create text generation pipeline
text_generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
# prompt for lyrics
prompt = f"Lyrics:"
# generate and print
generated_texts = text_generator(
prompt,
max_length=150,
num_return_sequences=1,
temperature=0.9,
top_k=50,
top_p=0.95,
do_sample=True,
)
print("Generated Lyrics:")
print(generated_texts[0]["generated_text"])
``` |