Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,6 +66,9 @@ def chat():
|
|
| 66 |
)
|
| 67 |
return jsonify({"response": response_text})
|
| 68 |
|
|
|
|
|
|
|
|
|
|
| 69 |
# Find the answer by matching the user message with questions in the JSON file
|
| 70 |
matched_entry = next(
|
| 71 |
(
|
|
@@ -164,7 +167,7 @@ def add_insight():
|
|
| 164 |
)
|
| 165 |
else:
|
| 166 |
current_analysis_key = None
|
| 167 |
-
final_summary = "Okay! It seems like there are no more interesting trends to explore in this dataset
|
| 168 |
return jsonify(
|
| 169 |
{
|
| 170 |
"response": response,
|
|
|
|
| 66 |
)
|
| 67 |
return jsonify({"response": response_text})
|
| 68 |
|
| 69 |
+
if user_message == "thanks":
|
| 70 |
+
return jsonify({"response": "You're welcome! It was a pleasure helping you!"})
|
| 71 |
+
|
| 72 |
# Find the answer by matching the user message with questions in the JSON file
|
| 73 |
matched_entry = next(
|
| 74 |
(
|
|
|
|
| 167 |
)
|
| 168 |
else:
|
| 169 |
current_analysis_key = None
|
| 170 |
+
final_summary = "Okay! It seems like there are no more interesting trends to explore in this dataset. Summary: Most of the incidents are hardware-related and they originated in Australia. They mostly are due to a printer not working. Recommended action: Fix the particular printer that's not working."
|
| 171 |
return jsonify(
|
| 172 |
{
|
| 173 |
"response": response,
|