Spaces:
Runtime error
Runtime error
makcrx
commited on
Commit
·
a37ec14
1
Parent(s):
9bccd0c
fix
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def main(query):
|
|
14 |
result_docs = db.similarity_search_with_score(query, k=20)
|
15 |
|
16 |
if len(query_keywords) > 0:
|
17 |
-
result_docs = list(filter(lambda doc: len(set(
|
18 |
|
19 |
if len(result_docs) == 0:
|
20 |
return 'Ответ не найден', 0, ''
|
|
|
14 |
result_docs = db.similarity_search_with_score(query, k=20)
|
15 |
|
16 |
if len(query_keywords) > 0:
|
17 |
+
result_docs = list(filter(lambda doc: len(set(extract_keywords2(doc[0].page_content)).intersection(query_keywords)) > 0, result_docs))
|
18 |
|
19 |
if len(result_docs) == 0:
|
20 |
return 'Ответ не найден', 0, ''
|