import gradio as gr # Use a pipeline as a high-level helper from transformers import pipeline, set_seed pipe = pipeline("text-generation", model="Narsil/gpt3", trust_remote_code=True) set_seed(42) def greet(name): return pipe(name)[0]['generated_text'] # greet('df') iface = gr.Interface(fn=greet, inputs="text", outputs="text") iface.launch()