update 0809
Browse files
app.py
CHANGED
@@ -458,7 +458,7 @@ def chatbot_response(message, history, window_size, threshold, score_threshold,u
|
|
458 |
start_time=time.time()
|
459 |
# distance, ad_summary, ad_keywords = get_response_from_db(keywords_dict, class_name="ad_DB02")
|
460 |
#数据库索引,数据库关键词平均方式
|
461 |
-
candidates=get_candidates_from_db(keywords_dict, class_name="
|
462 |
|
463 |
candidates.sort(key=lambda x:x['distance'])
|
464 |
candidates=[candidate for candidate in candidates if candidate['distance']<threshold]
|
|
|
458 |
start_time=time.time()
|
459 |
# distance, ad_summary, ad_keywords = get_response_from_db(keywords_dict, class_name="ad_DB02")
|
460 |
#数据库索引,数据库关键词平均方式
|
461 |
+
candidates=get_candidates_from_db(keywords_dict, class_name="Ad_DB08",limit=candidate_length)
|
462 |
|
463 |
candidates.sort(key=lambda x:x['distance'])
|
464 |
candidates=[candidate for candidate in candidates if candidate['distance']<threshold]
|