Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,6 +101,17 @@ type `read query`
|
|
| 101 |
time.sleep(1)
|
| 102 |
return history
|
| 103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
''' def bot(history, url_params):
|
| 105 |
global session_index
|
| 106 |
if "read query" in history[-1][0]:
|
|
@@ -134,16 +145,6 @@ type `read query`
|
|
| 134 |
|
| 135 |
print(url_params)
|
| 136 |
|
| 137 |
-
# get url params out of JavaScript function as variables and pass the session_index to fetch_personalized_data() function
|
| 138 |
-
def session (session_index):
|
| 139 |
-
bot_message = f"""
|
| 140 |
-
here your session ID:
|
| 141 |
-
{json.dumps(session_index, indent=4)}
|
| 142 |
-
"""
|
| 143 |
-
return bot_message
|
| 144 |
-
|
| 145 |
-
bot_message = session(session_index)
|
| 146 |
-
print(bot_message)
|
| 147 |
|
| 148 |
def fetch_personalized_data():
|
| 149 |
global session_index
|
|
|
|
| 101 |
time.sleep(1)
|
| 102 |
return history
|
| 103 |
|
| 104 |
+
# get url params out of JavaScript function as variables and pass the session_index to fetch_personalized_data() function
|
| 105 |
+
def session (session_index):
|
| 106 |
+
bot_message = f"""
|
| 107 |
+
here your session ID:
|
| 108 |
+
{json.dumps(session_index, indent=4)}
|
| 109 |
+
"""
|
| 110 |
+
return bot_message
|
| 111 |
+
|
| 112 |
+
bot_message = session(session_index)
|
| 113 |
+
print(bot_message)
|
| 114 |
+
|
| 115 |
''' def bot(history, url_params):
|
| 116 |
global session_index
|
| 117 |
if "read query" in history[-1][0]:
|
|
|
|
| 145 |
|
| 146 |
print(url_params)
|
| 147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
|
| 149 |
def fetch_personalized_data():
|
| 150 |
global session_index
|