AIChef / app.py
2006elad's picture
Update app.py
ea78aa8
raw
history blame
414 Bytes
import gradio as gr
from transformers import pipeline
def predict(text, name):
pipe = pipeline("text2text-generation", model="flax-community/t5-recipe-generation")
output = pipe(text)[0]
print("Pipeline output:", output) # Print the complete output dictionary
return output["translation_text"]
demo = gr.Interface(
fn=predict,
inputs=('text', 'text'),
outputs='text',
)
demo.launch()