chansung commited on
Commit
6f7615d
1 Parent(s): 324f5ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
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()