Shivam29rathore commited on
Commit
0caa542
·
1 Parent(s): 890482c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -151,7 +151,7 @@ def pegasus(text):
151
  tokenized_sentences = []
152
  sentences = []
153
  length = 0
154
- for sentence in sent_tokenize(file):
155
  length += len(sentence)
156
  # 512 is the maximum input length for the Pegasus model
157
  if length < 512:
 
151
  tokenized_sentences = []
152
  sentences = []
153
  length = 0
154
+ for sentence in tokenized_sentences(file):
155
  length += len(sentence)
156
  # 512 is the maximum input length for the Pegasus model
157
  if length < 512: