chansung commited on
Commit
b13490e
β€’
1 Parent(s): c9ae9c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -15
app.py CHANGED
@@ -453,10 +453,10 @@ Lastly, there is a hidden panel on the top right corner, and it will appear when
453
  instruction_txtbox.submit(
454
  lambda: [
455
  gr.update(visible=False),
456
- gr.update(visible=True)
457
  ],
458
  None,
459
- [example_block, stop]
460
  )
461
 
462
  send_event = instruction_txtbox.submit(
@@ -465,32 +465,23 @@ Lastly, there is a hidden panel on the top right corner, and it will appear when
465
  global_context, ctx_num_lconv, ctx_sum_prompt,
466
  res_temp, res_topp, res_topk, res_rpen, res_mnts, res_beams, res_cache, res_sample, res_eosid, res_padid],
467
  [instruction_txtbox, chatbot, context_inspector, local_data],
468
- ).then(
 
 
469
  None, local_data, None,
470
  _js="(v)=>{ setStorage('local_data',v) }"
471
- ).then(
472
- lambda: [
473
- gr.update(interactive=True),
474
- gr.update(interactive=False),
475
- ],
476
- None,
477
- [regenerate, stop]
478
  )
479
 
480
  regenerate.click(
481
  rollback_last,
482
  [idx, local_data, chat_state],
483
  [instruction_txtbox, chatbot, local_data, regenerate]
484
- ).then(
485
- lambda: gr.update(interactive=False),
486
- None,
487
- stop
488
  ).then(
489
  central.chat_stream,
490
  [idx, local_data, instruction_txtbox, chat_state, model_num,
491
  global_context, ctx_num_lconv, ctx_sum_prompt,
492
  res_temp, res_topp, res_topk, res_rpen, res_mnts, res_beams, res_cache, res_sample, res_eosid, res_padid],
493
- [instruction_txtbox, chatbot, context_inspector, local_data],
494
  ).then(
495
  lambda: gr.update(interactive=True),
496
  None,
 
453
  instruction_txtbox.submit(
454
  lambda: [
455
  gr.update(visible=False),
456
+ gr.update(interactive=True)
457
  ],
458
  None,
459
+ [example_block, regenerate]
460
  )
461
 
462
  send_event = instruction_txtbox.submit(
 
465
  global_context, ctx_num_lconv, ctx_sum_prompt,
466
  res_temp, res_topp, res_topk, res_rpen, res_mnts, res_beams, res_cache, res_sample, res_eosid, res_padid],
467
  [instruction_txtbox, chatbot, context_inspector, local_data],
468
+ )
469
+
470
+ instruction_txtbox.submit(
471
  None, local_data, None,
472
  _js="(v)=>{ setStorage('local_data',v) }"
 
 
 
 
 
 
 
473
  )
474
 
475
  regenerate.click(
476
  rollback_last,
477
  [idx, local_data, chat_state],
478
  [instruction_txtbox, chatbot, local_data, regenerate]
 
 
 
 
479
  ).then(
480
  central.chat_stream,
481
  [idx, local_data, instruction_txtbox, chat_state, model_num,
482
  global_context, ctx_num_lconv, ctx_sum_prompt,
483
  res_temp, res_topp, res_topk, res_rpen, res_mnts, res_beams, res_cache, res_sample, res_eosid, res_padid],
484
+ [instruction_txtbox, chatbot, context_inspector, local_data],
485
  ).then(
486
  lambda: gr.update(interactive=True),
487
  None,