Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 `
|
| 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 "
|
| 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"""
|