Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,9 +109,9 @@ with gr.Blocks() as demo:
|
|
| 109 |
def get_session_index(url_params):
|
| 110 |
if url_params:
|
| 111 |
print(f"""
|
| 112 |
-
{
|
| 113 |
""")
|
| 114 |
-
session_index = url_params.get('session_index')
|
| 115 |
if session_index: # Check if session_index is not None or empty
|
| 116 |
print(session_index)
|
| 117 |
# Fetch personalized data
|
|
@@ -122,7 +122,8 @@ with gr.Blocks() as demo:
|
|
| 122 |
else:
|
| 123 |
print("There are no URL parameters available.")
|
| 124 |
time.sleep(1)
|
| 125 |
-
|
|
|
|
| 126 |
|
| 127 |
session_index = get_session_index(url_params)
|
| 128 |
personalized_data = fetch_personalized_data(session_index)
|
|
|
|
| 109 |
def get_session_index(url_params):
|
| 110 |
if url_params:
|
| 111 |
print(f"""
|
| 112 |
+
{url_params.value}
|
| 113 |
""")
|
| 114 |
+
session_index = url_params.value.get('session_index')
|
| 115 |
if session_index: # Check if session_index is not None or empty
|
| 116 |
print(session_index)
|
| 117 |
# Fetch personalized data
|
|
|
|
| 122 |
else:
|
| 123 |
print("There are no URL parameters available.")
|
| 124 |
time.sleep(1)
|
| 125 |
+
return session_index
|
| 126 |
+
|
| 127 |
|
| 128 |
session_index = get_session_index(url_params)
|
| 129 |
personalized_data = fetch_personalized_data(session_index)
|