File size: 459 Bytes
1bd71b4
1be7192
1bd71b4
 
1be7192
d564713
 
 
 
1be7192
 
 
 
d564713
1be7192
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from transformers import FlaxT5ForConditionalGeneration
import gradio as gr

model_flax = FlaxT5ForConditionalGeneration.from_pretrained("thegoodfellas/tgf-flan-t5-base-ptbr")

def summarize():
    pass

demo = gr.Interface(fn=summarize,
    inputs=[
        gr.inputs.Textbox(lines=20, label="Text"),
    ],
    outputs=gr.outputs.Textbox(label="Summary"),
    title="Flan T5 Summarization",
    description="Summarize text using T5 model",
)

demo.launch()