Update app.py
Browse files
app.py
CHANGED
@@ -35,9 +35,9 @@ def load_questions_from_json(file_path="questions.json"):
|
|
35 |
return json.load(file)
|
36 |
|
37 |
# Поиск ответа в JSON
|
38 |
-
def find_answer_in_json(questions_data,
|
39 |
for item in questions_data:
|
40 |
-
if
|
41 |
return item["answer"]
|
42 |
return None
|
43 |
|
|
|
35 |
return json.load(file)
|
36 |
|
37 |
# Поиск ответа в JSON
|
38 |
+
def find_answer_in_json(questions_data, message):
|
39 |
for item in questions_data:
|
40 |
+
if message.lower() in item["question"].lower():
|
41 |
return item["answer"]
|
42 |
return None
|
43 |
|