Yuchan5386 commited on
Commit
9f5ee66
·
verified ·
1 Parent(s): 6617185

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +3 -2
api.py CHANGED
@@ -288,7 +288,8 @@ def summarize_from_wikipedia(query, top_n=3):
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()
294
  greet_keywords = ["안녕", "반가워", "이름", "누구", "소개", "어디서 왔", "정체", "몇 살", "너 뭐야"]
@@ -333,7 +334,7 @@ def respond(input_text):
333
  if not keyword:
334
  return "어떤 주제에 대해 궁금한가요?"
335
  summary = summarize_from_wikipedia(keyword)
336
- return f"{summary}\n다른 궁금한 점 있으신가요?"
337
 
338
  # 일상 대화: 샘플링 + fallback
339
  response = generate_text_with_temp_and_rep_penalty(model, input_text)
 
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
+
293
  def simple_intent_classifier(text):
294
  text = text.lower()
295
  greet_keywords = ["안녕", "반가워", "이름", "누구", "소개", "어디서 왔", "정체", "몇 살", "너 뭐야"]
 
334
  if not keyword:
335
  return "어떤 주제에 대해 궁금한가요?"
336
  summary = summarize_from_wikipedia(keyword)
337
+ return f"{second_summary}\n다른 궁금한 점 있으신가요?"
338
 
339
  # 일상 대화: 샘플링 + fallback
340
  response = generate_text_with_temp_and_rep_penalty(model, input_text)