Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
generator = pipeline("text-generation", model="gpt2") | |
prompt = "Once upon a time, in a galaxy far, far away" | |
generated_text = generator(prompt, max_length=100, num_return_sequences=3) | |
print(generated_text) |