Update app.py
Browse files
app.py
CHANGED
@@ -118,10 +118,10 @@ def query_model(question):
|
|
118 |
"""
|
119 |
if question == "":
|
120 |
return "Welcome to AI-nstein! Ask me anything about AI ML, and helpful tools you may want to use!"
|
121 |
-
|
122 |
if not relevant_segment:
|
123 |
return "Could not find specific information. Please refine your question."
|
124 |
-
|
125 |
return response
|
126 |
|
127 |
# Define the welcome message and specific topics the chatbot can provide information about
|
|
|
118 |
"""
|
119 |
if question == "":
|
120 |
return "Welcome to AI-nstein! Ask me anything about AI ML, and helpful tools you may want to use!"
|
121 |
+
relevant_segment = find_relevant_segment(question, segments)
|
122 |
if not relevant_segment:
|
123 |
return "Could not find specific information. Please refine your question."
|
124 |
+
response = generate_response(question, relevant_segment)
|
125 |
return response
|
126 |
|
127 |
# Define the welcome message and specific topics the chatbot can provide information about
|