Flan-T5-xl / app.py
rutsam's picture
Update app.py
0023da7
raw
history blame
427 Bytes
import gradio as gr
from transformers import pipeline
pipeline_flan=pipeline(model="google/flan-t5-xl")
def generatellm(text):
output_flan = pipeline_flan(text, max_length=100)[0]["generated_text"]
return output_flan
gradio_ui= gr.Interface(
fn=translate,
title="Translation Demo",
inputs= gr.components.Textbox(label="Enter your text"),
outputs=gr.outputs.Textbox(label="Results")
)
gradio_ui.launch()