Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
|
3 |
|
4 |
tokenizer = AutoTokenizer.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
|
5 |
|
6 |
model = AutoModelForSeq2SeqLM.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
|
7 |
-
pipe = pipeline(task="
|
8 |
model=model,
|
9 |
tokenizer=tokenizer,)
|
10 |
|
11 |
gr.Interface.from_pipeline(pipe,
|
12 |
-
title="financial
|
13 |
description="Add description",
|
14 |
).launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, Text2TextGenerationPipeline, pipeline
|
3 |
|
4 |
tokenizer = AutoTokenizer.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
|
5 |
|
6 |
model = AutoModelForSeq2SeqLM.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
|
7 |
+
pipe = pipeline(task="text2text-generation",
|
8 |
model=model,
|
9 |
tokenizer=tokenizer,)
|
10 |
|
11 |
gr.Interface.from_pipeline(pipe,
|
12 |
+
title="financial text2text",
|
13 |
description="Add description",
|
14 |
).launch()
|