Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
model_name = "JakeTurner616/Adonalsium-gpt2" # Replace with your model's name on Hugging Face | |
generator = pipeline('text-generation', model=model_name) | |
def generate_text(prompt): | |
results = generator(prompt, max_length=100, num_return_sequences=1) | |
return results[0]['generated_text'] | |
iface = gr.Interface(fn=generate_text, inputs="text", outputs="text") | |
iface.launch() |