Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,15 @@
|
|
1 |
from transformers import FlaxT5ForConditionalGeneration
|
|
|
2 |
|
3 |
model_flax = FlaxT5ForConditionalGeneration.from_pretrained("thegoodfellas/tgf-flan-t5-base-ptbr")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from transformers import FlaxT5ForConditionalGeneration
|
2 |
+
import gradio as gr
|
3 |
|
4 |
model_flax = FlaxT5ForConditionalGeneration.from_pretrained("thegoodfellas/tgf-flan-t5-base-ptbr")
|
5 |
+
|
6 |
+
demo = gr.Interface(fn=summarize_wrapper,
|
7 |
+
inputs=[
|
8 |
+
gr.inputs.Textbox(lines=20, label="Text"),
|
9 |
+
],
|
10 |
+
outputs=gr.outputs.Textbox(label="Summary"),
|
11 |
+
title="T5 Summarization",
|
12 |
+
description="Summarize text using T5 model",
|
13 |
+
)
|
14 |
+
|
15 |
+
demo.launch()
|