botsi commited on
Commit
bb416a7
·
verified ·
1 Parent(s): 3643fd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -64,7 +64,7 @@ def get_window_url_params():
64
 
65
  with gr.Blocks() as demo:
66
  gr.Markdown("""## Gradio send queryparam to chatbot
67
- type `read query`
68
  """)
69
  url_params = gr.JSON({}, visible=False, label="URL Params")
70
  chatbot = gr.Chatbot().style(height=500)
@@ -75,7 +75,7 @@ with gr.Blocks() as demo:
75
  return "", history + [[user_message, None]]
76
 
77
  def bot(history, url_params):
78
- if "read query" in history[-1][0]:
79
  session_index = url_params.get('session_index')
80
  print(session_index)
81
  bot_message = f"""
 
64
 
65
  with gr.Blocks() as demo:
66
  gr.Markdown("""## Gradio send queryparam to chatbot
67
+ type `hi`
68
  """)
69
  url_params = gr.JSON({}, visible=False, label="URL Params")
70
  chatbot = gr.Chatbot().style(height=500)
 
75
  return "", history + [[user_message, None]]
76
 
77
  def bot(history, url_params):
78
+ if "hi" in history[-1][0]:
79
  session_index = url_params.get('session_index')
80
  print(session_index)
81
  bot_message = f"""