i-like-flan / app.py
osanseviero's picture
Update app.py
c6144cf
raw
history blame
320 Bytes
import os
import gradio as gr
import numpy as np
from transformers import pipeline
pipe = pipeline("text2text-generation", model="google/flan-t5-large")
def inference(text):
output = pipe(text)
return output["generated_text"]
io = gr.Interface.load(inference, gr.Textbox(lines=3), gr.Textbox(lines=3))
io.launch()