Spaces:
Running
on
A10G
Running
on
A10G
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() |