botsi commited on
Commit
2a0d03d
·
verified ·
1 Parent(s): 55ce665

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -12
app.py CHANGED
@@ -70,18 +70,6 @@ get_window_session_index = """
70
  }
71
  """
72
 
73
-
74
- # get url params out of JavaScript function as variables and pass the session_index to fetch_personalized_data() function
75
- def session (session_index):
76
- bot_message = f"""
77
- here your session ID:
78
- {json.dumps(session_index, indent=4)}
79
- """
80
- return bot_message
81
-
82
- bot_message = session(session_index)
83
- print(bot_message)
84
-
85
  with gr.Blocks() as demo:
86
  gr.Markdown("""## Gradio send queryparam to chatbot
87
  type `read query`
@@ -146,6 +134,16 @@ type `read query`
146
 
147
  print(url_params)
148
 
 
 
 
 
 
 
 
 
 
 
149
 
150
  def fetch_personalized_data():
151
  global session_index
 
70
  }
71
  """
72
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  with gr.Blocks() as demo:
74
  gr.Markdown("""## Gradio send queryparam to chatbot
75
  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