DutchNomadCode's picture
add text-generation pipeline
dd13ee8 verified
raw
history blame
220 Bytes
import gradio as gr
from transformers import pipeline
def greet(name):
generator = pipeline("text-generation")
return generator(name)
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()