chansung commited on
Commit
4495d82
1 Parent(s): 93e5809

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -310,8 +310,7 @@ with gr.Blocks(css=MODEL_SELECTION_CSS, theme='gradio/soft') as demo:
310
  [idx, local_data, instruction_txtbox, chat_state,
311
  global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv],
312
  [instruction_txtbox, context_inspector, chatbot, local_data]
313
- )
314
- instruction_txtbox.submit(
315
  None, local_data, None,
316
  _js="(v)=>{ setStorage('local_data',v) }"
317
  )
@@ -342,16 +341,15 @@ with gr.Blocks(css=MODEL_SELECTION_CSS, theme='gradio/soft') as demo:
342
  [idx, local_data, chat_state,
343
  global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv],
344
  [context_inspector, chatbot, local_data, regenerate]
345
- )
346
- regenerate.click(
347
  None, local_data, None,
348
  _js="(v)=>{ setStorage('local_data',v) }"
349
  )
350
 
351
- stop.click(
352
- lambda: gr.update(interactive=True), None, regenerate,
353
- cancels=[send_event, regen_event]
354
- )
355
 
356
  for btn in channel_btns:
357
  btn.click(
 
310
  [idx, local_data, instruction_txtbox, chat_state,
311
  global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv],
312
  [instruction_txtbox, context_inspector, chatbot, local_data]
313
+ ).then(
 
314
  None, local_data, None,
315
  _js="(v)=>{ setStorage('local_data',v) }"
316
  )
 
341
  [idx, local_data, chat_state,
342
  global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv],
343
  [context_inspector, chatbot, local_data, regenerate]
344
+ ).then(
 
345
  None, local_data, None,
346
  _js="(v)=>{ setStorage('local_data',v) }"
347
  )
348
 
349
+ # stop.click(
350
+ # lambda: gr.update(interactive=True), None, regenerate,
351
+ # cancels=[send_event, regen_event]
352
+ # )
353
 
354
  for btn in channel_btns:
355
  btn.click(