Spaces:
Build error
Build error
hellopahe
commited on
Commit
·
d06b9ce
1
Parent(s):
bbf9596
fix
Browse files
app.py
CHANGED
@@ -77,16 +77,8 @@ class LexRank(object):
|
|
77 |
# We argsort so that the first element is the sentence with the highest score
|
78 |
most_central_sentence_indices = numpy.argsort(-centrality_scores)
|
79 |
|
80 |
-
num =
|
81 |
ptr = 0
|
82 |
-
for index, sentence in enumerate(sentences):
|
83 |
-
num -= len(sentence)
|
84 |
-
if num < 0 and index > 0:
|
85 |
-
ptr = index - 1
|
86 |
-
break
|
87 |
-
if num < 0 and index == 0:
|
88 |
-
ptr = index
|
89 |
-
break
|
90 |
for index in most_central_sentence_indices:
|
91 |
num -= len(sentences[index])
|
92 |
if num < 0 and index > 0:
|
|
|
77 |
# We argsort so that the first element is the sentence with the highest score
|
78 |
most_central_sentence_indices = numpy.argsort(-centrality_scores)
|
79 |
|
80 |
+
num = 100
|
81 |
ptr = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
for index in most_central_sentence_indices:
|
83 |
num -= len(sentences[index])
|
84 |
if num < 0 and index > 0:
|