Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,12 +3,14 @@ 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 |
|
8 |
-
pipe = pipeline(task="summarization",
|
9 |
-
model=model,
|
10 |
#tokenizer=tokenizer,)
|
11 |
|
|
|
|
|
12 |
with open('text1.txt') as f:
|
13 |
text1 = f.read()
|
14 |
|
|
|
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 |
|
8 |
+
#pipe = pipeline(task="summarization",
|
9 |
+
#model=model,
|
10 |
#tokenizer=tokenizer,)
|
11 |
|
12 |
+
pipe = pipeline(task="summarization", model = "human-centered-summarization/financial-summarization-pegasus")
|
13 |
+
|
14 |
with open('text1.txt') as f:
|
15 |
text1 = f.read()
|
16 |
|