Model Card for Model ID
Midwest indie band 24thankyou lyrics generator, finetuned from gpt2.
How to Use
You can use the following code to generate lyrics:
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"])
- Downloads last month
- 65
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.