LeeveWasTaken commited on
Commit
cfe38d8
·
verified ·
1 Parent(s): 2ac5d9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -13
app.py CHANGED
@@ -59,20 +59,13 @@ with gr.Blocks() as demo:
59
  """
60
  )
61
 
62
- # Layout for 3 columns and 2 rows
63
- output = [gr.Image(label=m, min_width=480) for m in default_models]
64
- current_models = [gr.Textbox(m, visible=False) for m in default_models]
65
-
66
  with gr.Row():
67
- with gr.Column():
68
- for i in range(0, 6, 3):
69
- with gr.Row():
70
- for j in range(3):
71
- if i + j < len(output):
72
- o = output[i + j]
73
- m = current_models[i + j]
74
- gen_event = gen_button.click(gen_fn, [m, txt_input, neg_prompt, image_style], o, concurrency_limit=10)
75
- stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
76
 
77
  with gr.Accordion('Model selection'):
78
  model_choice = gr.CheckboxGroup(models, label=f'Choose up to {num_models} different models from the best available!', value=default_models, interactive=True)
 
59
  """
60
  )
61
 
 
 
 
 
62
  with gr.Row():
63
+ output = [gr.Image(label=m, min_width=480) for m in default_models]
64
+ current_models = [gr.Textbox(m, visible=False) for m in default_models]
65
+
66
+ for m, o in zip(current_models, output):
67
+ gen_event = gen_button.click(gen_fn, [m, txt_input, neg_prompt, image_style], o, concurrency_limit=10)
68
+ stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
 
 
 
69
 
70
  with gr.Accordion('Model selection'):
71
  model_choice = gr.CheckboxGroup(models, label=f'Choose up to {num_models} different models from the best available!', value=default_models, interactive=True)