botsi commited on
Commit
95c890c
·
verified ·
1 Parent(s): daed408

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -71,13 +71,13 @@ get_window_session_index = """
71
  """
72
 
73
  with gr.Blocks() as demo:
74
- gr.Markdown("""## Gradio send queryparam to chatbot
75
- type `read query`
76
- """)
77
  url_params = gr.JSON({}, visible=False, label="URL Params")
78
  chatbot = gr.Chatbot().style(height=500)
79
  msg = gr.Textbox()
80
  clear = gr.Button("Clear")
 
 
81
 
82
  def user(user_message, url_params, history):
83
  return "", history + [[user_message, None]]
 
71
  """
72
 
73
  with gr.Blocks() as demo:
74
+ gr.Markdown("""## Gradio send queryparam to chatbot type `read query`""")
 
 
75
  url_params = gr.JSON({}, visible=False, label="URL Params")
76
  chatbot = gr.Chatbot().style(height=500)
77
  msg = gr.Textbox()
78
  clear = gr.Button("Clear")
79
+ session_index = url_params.get('session_index')
80
+ print(session_index)
81
 
82
  def user(user_message, url_params, history):
83
  return "", history + [[user_message, None]]