RdnUser77 commited on
Commit
9a9e681
1 Parent(s): 0d2ba9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -56,7 +56,7 @@ with gr.Blocks() as demo:
56
  output = [gr.Image(label = m) for m in default_models]
57
  current_models = [gr.Textbox(m, visible = False) for m in default_models]
58
 
59
- model_choice.change(update_imgbox, model_choice, output)
60
  model_choice.change(extend_choices, model_choice, current_models)
61
 
62
  for m, o in zip(current_models, output):
@@ -80,7 +80,7 @@ with gr.Blocks() as demo:
80
 
81
  for i, o in enumerate(output2):
82
  img_i = gr.Number(i, visible = False)
83
- num_images.change(lambda i, n: gr.update(visible = (i < n)), [img_i, num_images], o)
84
  gen_event2 = gen_button2.click(lambda i, n, m, t: gen_fn(m, t) if (i < n) else None, [img_i, num_images, model_choice2, txt_input2], o)
85
  stop_button2.click(lambda s: gr.update(interactive = False), None, stop_button2, cancels = [gen_event2])
86
 
 
56
  output = [gr.Image(label = m) for m in default_models]
57
  current_models = [gr.Textbox(m, visible = False) for m in default_models]
58
 
59
+ model_choice.change(update_imgbox, model_choice, output, show_progress = False)
60
  model_choice.change(extend_choices, model_choice, current_models)
61
 
62
  for m, o in zip(current_models, output):
 
80
 
81
  for i, o in enumerate(output2):
82
  img_i = gr.Number(i, visible = False)
83
+ num_images.change(lambda i, n: gr.update(visible = (i < n)), [img_i, num_images], o, show_progress = False)
84
  gen_event2 = gen_button2.click(lambda i, n, m, t: gen_fn(m, t) if (i < n) else None, [img_i, num_images, model_choice2, txt_input2], o)
85
  stop_button2.click(lambda s: gr.update(interactive = False), None, stop_button2, cancels = [gen_event2])
86