AIChef / app.py
2006elad's picture
Update app.py
ada2c64
raw
history blame
316 Bytes
import gardio as gr
from transformers import pipeline
def predict(text, name):
pipe = pipeline("text2text-generation", model="flax-community/t5-recipe-generation")
return pipe(text)[0]["translation_text"]
demo = gr.Interface(
fn=predict,
inputs('text','text'),
outputs='text' ,
)
demo.launch()