Yntec commited on
Commit
b1d0d41
·
verified ·
1 Parent(s): a29b766

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -54,14 +54,6 @@ with gr.Blocks() as demo:
54
  stop_button2 = gr.Button('Stop', variant = 'secondary', interactive = False)
55
  gen_button2.click(lambda s: gr.update(interactive = True), None, stop_button2)
56
 
57
- with gr.Row():
58
- output2 = [gr.Image(label = '', min_width=480) for _ in range(max_images)]
59
-
60
- for i, o in enumerate(output2):
61
- img_i = gr.Number(i, visible = False)
62
- num_images.change(lambda i, n: gr.update(visible = (i < n)), [img_i, num_images], o, show_progress = False)
63
- 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)
64
- stop_button2.click(lambda s: gr.update(interactive = False), None, stop_button2, cancels = [gen_event2])
65
  gr.HTML(
66
  """
67
  <div style="text-align: center; max-width: 1200px; margin: 0 auto;">
@@ -74,6 +66,15 @@ with gr.Blocks() as demo:
74
  </div>
75
  """
76
  )
 
 
 
 
 
 
 
 
 
77
  with gr.Row():
78
  gr.HTML(
79
  """
 
54
  stop_button2 = gr.Button('Stop', variant = 'secondary', interactive = False)
55
  gen_button2.click(lambda s: gr.update(interactive = True), None, stop_button2)
56
 
 
 
 
 
 
 
 
 
57
  gr.HTML(
58
  """
59
  <div style="text-align: center; max-width: 1200px; margin: 0 auto;">
 
66
  </div>
67
  """
68
  )
69
+
70
+ with gr.Row():
71
+ output2 = [gr.Image(label = '') for _ in range(max_images)]
72
+
73
+ for i, o in enumerate(output2):
74
+ img_i = gr.Number(i, visible = False)
75
+ num_images.change(lambda i, n: gr.update(visible = (i < n), min_width=480), [img_i, num_images], o, show_progress = False)
76
+ 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)
77
+ stop_button2.click(lambda s: gr.update(interactive = False), None, stop_button2, cancels = [gen_event2])
78
  with gr.Row():
79
  gr.HTML(
80
  """