Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
@@ -283,10 +283,11 @@ def textrank_summarize(text, top_n=3):
|
|
283 |
summary = ' '.join([sentences[i] for i in selected_idx])
|
284 |
return summary
|
285 |
|
286 |
-
def summarize_from_wikipedia(query, top_n=3):
|
287 |
-
raw_summary = get_wikipedia_summary(query)
|
288 |
-
|
289 |
-
|
|
|
290 |
# 의도 분류기
|
291 |
def simple_intent_classifier(text):
|
292 |
text = text.lower()
|
|
|
283 |
summary = ' '.join([sentences[i] for i in selected_idx])
|
284 |
return summary
|
285 |
|
286 |
+
def summarize_from_wikipedia(query, top_n=3):
|
287 |
+
raw_summary = get_wikipedia_summary(query)
|
288 |
+
first_summary = textrank_summarize(raw_summary, top_n=top_n)
|
289 |
+
second_summary = textrank_summarize(first_summary, top_n=top_n)
|
290 |
+
return second_summary
|
291 |
# 의도 분류기
|
292 |
def simple_intent_classifier(text):
|
293 |
text = text.lower()
|