Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,8 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
|
|
3 |
|
4 |
tokenizer = AutoTokenizer.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
|
5 |
model = AutoModelForSeq2SeqLM.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
|
6 |
-
# pipe = pipeline(task="summarization",
|
7 |
-
# model=model,
|
8 |
-
# tokenizer=tokenizer,)
|
9 |
|
10 |
-
pipe = pipeline(task="text2text-generation", model
|
11 |
|
12 |
with open('text1.txt') as f:
|
13 |
text1 = f.read()
|
|
|
3 |
|
4 |
tokenizer = AutoTokenizer.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
|
5 |
model = AutoModelForSeq2SeqLM.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
|
|
|
|
|
|
|
6 |
|
7 |
+
pipe = pipeline(task="text2text-generation", model=model, tokenizer=tokenizer)
|
8 |
|
9 |
with open('text1.txt') as f:
|
10 |
text1 = f.read()
|