Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -128,14 +128,13 @@ def summary_2(text):
|
|
128 |
most_freq_words_p.append(mfwp)
|
129 |
|
130 |
sentences = sent_tokenize(text)
|
131 |
-
summary2
|
132 |
-
|
133 |
for sent in sentences:
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
|
140 |
return summary2
|
141 |
|
|
|
128 |
most_freq_words_p.append(mfwp)
|
129 |
|
130 |
sentences = sent_tokenize(text)
|
131 |
+
summary2= []
|
|
|
132 |
for sent in sentences:
|
133 |
+
for word in sent.split():
|
134 |
+
if word in most_freq_words_p and sent not in summary:
|
135 |
+
summary2.append(sent)
|
136 |
+
else :
|
137 |
+
None
|
138 |
|
139 |
return summary2
|
140 |
|