arpm01 commited on
Commit
9fa6305
·
1 Parent(s): 2e88510

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
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 = model, tokenizer=tokenizer)
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()