alexnasa commited on
Commit
cb47a69
·
verified ·
1 Parent(s): f19a932

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -360,10 +360,7 @@ def generate_image(
360
  num_rows = int(math.ceil(num_images / num_cols))
361
  image = image_grid(image, num_rows, num_cols)
362
 
363
- # save_path = f"{temp_dir}/tmp_result.png"
364
- # image.save(save_path)
365
-
366
- return image
367
 
368
  def create_image_input(index, open=True, indices_state=None):
369
  accordion_state = gr.State(open)
@@ -608,6 +605,7 @@ if __name__ == "__main__":
608
 
609
  with gr.Column():
610
  output = gr.Image(label="Result")
 
611
 
612
  examples = gr.Examples(
613
  examples=[
@@ -632,7 +630,7 @@ if __name__ == "__main__":
632
  images[0], captions[0],
633
  images[1], captions[1],
634
  ],
635
- outputs=output,
636
  fn=generate_image,
637
  cache_examples=True,
638
  )
@@ -663,7 +661,7 @@ if __name__ == "__main__":
663
  vae_lora_scale_str,
664
  session_state,
665
  ],
666
- outputs=output
667
  )
668
  clear_btn.click(clear_images, outputs=images)
669
 
 
360
  num_rows = int(math.ceil(num_images / num_cols))
361
  image = image_grid(image, num_rows, num_cols)
362
 
363
+ return image, prompt
 
 
 
364
 
365
  def create_image_input(index, open=True, indices_state=None):
366
  accordion_state = gr.State(open)
 
605
 
606
  with gr.Column():
607
  output = gr.Image(label="Result")
608
+ final_text = gr.Textbox(show_label=False, interactive=False)
609
 
610
  examples = gr.Examples(
611
  examples=[
 
630
  images[0], captions[0],
631
  images[1], captions[1],
632
  ],
633
+ outputs=[output, final_text],
634
  fn=generate_image,
635
  cache_examples=True,
636
  )
 
661
  vae_lora_scale_str,
662
  session_state,
663
  ],
664
+ outputs=[output, final_text]
665
  )
666
  clear_btn.click(clear_images, outputs=images)
667