Flan-T5-xl / app.py
tatoy's picture
Update app.py
02d1e09
raw
history blame
428 Bytes
import gradio as gr
from transformers import pipeline
pipeline_flan=pipeline(model="google/flan-t5-xxl")
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()