P01yH3dr0n commited on
Commit
a8f49b5
1 Parent(s): 8d49805

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -108,7 +108,7 @@ def generate(prompt, quality_tags, neg_prompt, seed, scale, width, height, steps
108
  today_count += 1
109
  img = image_from_bytes(img_data)
110
  filename = str(today_count).rjust(5, '0') + '-' + str(payload['parameters']['seed']) + '.png'
111
- return gr.Image(value=img, label=filename), payload
112
 
113
 
114
  def preview_ui():
@@ -125,7 +125,7 @@ def main_ui():
125
  gen_btn, paras, others = control_ui()
126
  with gr.Column():
127
  image, info = preview_ui()
128
- gen_btn.click(generate, paras + [others[0]], [image, info])
129
  others[2].click(lambda o, s: o if len(s) == 0 else s['parameters']['seed'], inputs=[paras[3], info], outputs=paras[3])
130
  others[3].click(lambda i: i, inputs=image, outputs=paras[14])
131
  others[4].click(lambda i: i, inputs=image, outputs=paras[17])
 
108
  today_count += 1
109
  img = image_from_bytes(img_data)
110
  filename = str(today_count).rjust(5, '0') + '-' + str(payload['parameters']['seed']) + '.png'
111
+ return img, payload
112
 
113
 
114
  def preview_ui():
 
125
  gen_btn, paras, others = control_ui()
126
  with gr.Column():
127
  image, info = preview_ui()
128
+ gen_btn.click(generate, paras + [others[0]], [image, info], postprocess=False)
129
  others[2].click(lambda o, s: o if len(s) == 0 else s['parameters']['seed'], inputs=[paras[3], info], outputs=paras[3])
130
  others[3].click(lambda i: i, inputs=image, outputs=paras[14])
131
  others[4].click(lambda i: i, inputs=image, outputs=paras[17])