KevlarVK commited on
Commit
f4e023f
1 Parent(s): 55a26b5

Update summarizer.py

Browse files
Files changed (1) hide show
  1. summarizer.py +1 -1
summarizer.py CHANGED
@@ -17,7 +17,7 @@ class BARTSummarizer:
17
 
18
  def summarize(self, text: str):
19
  encoded_input = self.tokenizer.encode(text, max_length=self.max_length, return_tensors='tf', truncation=True)
20
- summary_ids = self.model.generate(encoded_input, max_length=300, num_beams=4, early_stopping=True)
21
  summary = self.tokenizer.decode(summary_ids[0], skip_special_tokens=True)
22
  return summary
23
 
 
17
 
18
  def summarize(self, text: str):
19
  encoded_input = self.tokenizer.encode(text, max_length=self.max_length, return_tensors='tf', truncation=True)
20
+ summary_ids = self.model.generate(encoded_input, max_length=300, num_beams=4, early_stopping=True, min_length=70)
21
  summary = self.tokenizer.decode(summary_ids[0], skip_special_tokens=True)
22
  return summary
23