Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,15 +80,16 @@ with gr.Blocks() as demo:
|
|
| 80 |
return "", history + [[user_message, None]]
|
| 81 |
|
| 82 |
def bot(history, url_params):
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
# Fetch personalized data
|
| 91 |
personalized_data = fetch_personalized_data(session_index)
|
|
|
|
| 92 |
if personalized_data:
|
| 93 |
bot_message = "Personalized data fetched successfully."
|
| 94 |
return [[bot_message, None]]
|
|
|
|
| 80 |
return "", history + [[user_message, None]]
|
| 81 |
|
| 82 |
def bot(history, url_params):
|
| 83 |
+
if "read query" in history[-1][0]:
|
| 84 |
+
session_index = url_params.get('session_index')
|
| 85 |
+
print(session_index)
|
| 86 |
+
bot_message = f"""
|
| 87 |
+
here your URL params:
|
| 88 |
+
{json.dumps(url_params, indent=4)}
|
| 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]]
|