arpm01 commited on
Commit
9cb9795
·
1 Parent(s): fafb7d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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