Yntec commited on
Commit
e5a869c
1 Parent(s): 7ce358b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -72,7 +72,8 @@ with gr.Blocks() as demo:
72
  current_models = [gr.Textbox(m, visible = False) for m in default_models]
73
 
74
  for m, o in zip(current_models, output):
75
- gen_event = gen_button.click(gen_fn, [m, txt_input], o, concurrency_limit=None, queue=False)
 
76
  #stop_button.click(lambda s: gr.update(interactive = False), None, stop_button, cancels = [gen_event])
77
  with gr.Accordion('Model selection'):
78
  model_choice = gr.CheckboxGroup(models, label = f'Choose up to {int(num_models)} different models from the {len(models)} available!', value=default_models, interactive=True)
 
72
  current_models = [gr.Textbox(m, visible = False) for m in default_models]
73
 
74
  for m, o in zip(current_models, output):
75
+ gen_event = gr.on(triggers=[gen_button.click, txt_input.submit], fn=gen_fn,
76
+ inputs=[m, txt_input], outputs=[o], concurrency_limit=None, queue=False)
77
  #stop_button.click(lambda s: gr.update(interactive = False), None, stop_button, cancels = [gen_event])
78
  with gr.Accordion('Model selection'):
79
  model_choice = gr.CheckboxGroup(models, label = f'Choose up to {int(num_models)} different models from the {len(models)} available!', value=default_models, interactive=True)