Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
pipeline = pipeline(task="text-generation", model="gpt2") | |
def greet(name): | |
return "Hello " + name + "!!" | |
def gen_text(text): | |
return pipeline(text)[0] | |
iface = gr.Interface(fn=gen_text, inputs="text", outputs="text") | |
iface.launch() | |