botsi commited on
Commit
33ed882
·
verified ·
1 Parent(s): 969df49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- {json.dumps(url_params)}
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
- return session_index
 
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)