chansung commited on
Commit
6917255
1 Parent(s): 55d784d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -308,6 +308,13 @@ with gr.Blocks(css=MODEL_SELECTION_CSS, theme='gradio/soft') as demo:
308
  ctx_num_lconv = gr.Slider(2, 10, 3, step=1, label="number of recent talks to keep", interactive=True)
309
 
310
  send_event = instruction_txtbox.submit(
 
 
 
 
 
 
 
311
  chat_stream,
312
  [idx, local_data, instruction_txtbox, chat_state,
313
  global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv],
 
308
  ctx_num_lconv = gr.Slider(2, 10, 3, step=1, label="number of recent talks to keep", interactive=True)
309
 
310
  send_event = instruction_txtbox.submit(
311
+ lambda: [
312
+ gr.update(visible=False),
313
+ gr.update(interactive=True)
314
+ ],
315
+ None,
316
+ [example_block, regenerate]
317
+ ).then(
318
  chat_stream,
319
  [idx, local_data, instruction_txtbox, chat_state,
320
  global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv],