Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
model = AutoModelForImageClassification.from_pretrained("edixo/road_good_damaged_condition")
|
7 |
|
|
|
8 |
pipe = pipeline(task="image-classification",
|
9 |
model=model,
|
10 |
-
|
11 |
|
12 |
gr.Interface.from_pipeline(pipe,
|
13 |
-
title="
|
14 |
description="Add description",
|
15 |
).launch()
|
|
|
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="image-classification",
|
8 |
model=model,
|
9 |
+
tokenizer=tokenizer)
|
10 |
|
11 |
gr.Interface.from_pipeline(pipe,
|
12 |
+
title="financial summarization",
|
13 |
description="Add description",
|
14 |
).launch()
|