Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -208,4 +208,21 @@ with gr.Blocks(css=MODEL_SELECTION_CSS, theme='gradio/soft') as demo:
|
|
208 |
[chatbot, local_data]
|
209 |
)
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
demo.launch()
|
|
|
208 |
[chatbot, local_data]
|
209 |
)
|
210 |
|
211 |
+
for btn in channel_btns:
|
212 |
+
btn.click(
|
213 |
+
set_chatbot,
|
214 |
+
[btn, local_data, chat_state],
|
215 |
+
[chatbot, idx, example_block, regenerate]
|
216 |
+
).then(
|
217 |
+
None, btn, None,
|
218 |
+
_js=UPDATE_LEFT_BTNS_STATE
|
219 |
+
)
|
220 |
+
|
221 |
+
demo.load(
|
222 |
+
None,
|
223 |
+
inputs=None,
|
224 |
+
outputs=[chatbot, local_data],
|
225 |
+
_js=GET_LOCAL_STORAGE,
|
226 |
+
)
|
227 |
+
|
228 |
demo.launch()
|