Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -89,21 +89,16 @@ with gr.Blocks() as demo:
|
|
| 89 |
"""
|
| 90 |
# Fetch personalized data
|
| 91 |
personalized_data = fetch_personalized_data(session_index)
|
| 92 |
-
|
| 93 |
-
if personalized_data:
|
| 94 |
-
bot_message = "Personalized data fetched successfully."
|
| 95 |
-
return [[bot_message, None]]
|
| 96 |
-
else:
|
| 97 |
-
bot_message = "Error fetching personalized data."
|
| 98 |
-
return [[bot_message, None]]
|
| 99 |
-
|
| 100 |
-
elif "print data" in history[-1][0]:
|
| 101 |
-
personalized_data = fetch_personalized_data()
|
| 102 |
print(personalized_data)
|
| 103 |
-
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
else:
|
| 106 |
-
bot_message =
|
| 107 |
history[-1][1] = bot_message
|
| 108 |
time.sleep(1)
|
| 109 |
return history
|
|
|
|
| 89 |
"""
|
| 90 |
# Fetch personalized data
|
| 91 |
personalized_data = fetch_personalized_data(session_index)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
print(personalized_data)
|
| 93 |
+
|
| 94 |
+
#if personalized_data:
|
| 95 |
+
# bot_message = "Personalized data fetched successfully."
|
| 96 |
+
# return [[bot_message, None]]
|
| 97 |
+
#else:
|
| 98 |
+
# bot_message = "Error fetching personalized data."
|
| 99 |
+
# return [[bot_message, None]]
|
| 100 |
else:
|
| 101 |
+
bot_message = "There was an error. Please try again."
|
| 102 |
history[-1][1] = bot_message
|
| 103 |
time.sleep(1)
|
| 104 |
return history
|