alexnasa commited on
Commit
23fc16a
·
verified ·
1 Parent(s): 5863ed1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -208,8 +208,8 @@ def resize_keep_aspect_ratio(pil_image, target_size=1024):
208
  def generate_image(
209
  prompt,
210
  image_1, caption_1,
211
- image_2, caption_2,
212
- image_3, caption_3,
213
  use_id_1 = True,
214
  use_id_2 = True,
215
  use_id_3 = True,
@@ -612,26 +612,22 @@ if __name__ == "__main__":
612
  "ENT1 with long curly hair wearing ENT2 at Met Gala",
613
  "sample/woman2.jpg", "a woman",
614
  "sample/dress.jpg", "a dress",
615
- " ", " ",
616
  ],
617
  [
618
  "ENT1 wearing a tiny hat",
619
  "sample/hamster.jpg", "a hamster",
620
- " ", " ",
621
- " ", " ",
622
  ],
623
  [
624
  "a drawing of ENT1 and ENT2 that the ENT1 is running alongside of a giant ENT2, in style of a comic book",
625
  "sample/woman.jpg", "a woman",
626
  "sample/hamster.jpg", "a hamster",
627
- " ", " ",
628
  ],
629
  ],
630
  inputs=[
631
  prompt,
632
  images[0], captions[0],
633
  images[1], captions[1],
634
- images[2], captions[2],
635
  ],
636
  outputs=output,
637
  fn=generate_image,
 
208
  def generate_image(
209
  prompt,
210
  image_1, caption_1,
211
+ image_2 = None, caption_2 = None,
212
+ image_3 = None, caption_3 = None,
213
  use_id_1 = True,
214
  use_id_2 = True,
215
  use_id_3 = True,
 
612
  "ENT1 with long curly hair wearing ENT2 at Met Gala",
613
  "sample/woman2.jpg", "a woman",
614
  "sample/dress.jpg", "a dress",
 
615
  ],
616
  [
617
  "ENT1 wearing a tiny hat",
618
  "sample/hamster.jpg", "a hamster",
619
+ None, None
 
620
  ],
621
  [
622
  "a drawing of ENT1 and ENT2 that the ENT1 is running alongside of a giant ENT2, in style of a comic book",
623
  "sample/woman.jpg", "a woman",
624
  "sample/hamster.jpg", "a hamster",
 
625
  ],
626
  ],
627
  inputs=[
628
  prompt,
629
  images[0], captions[0],
630
  images[1], captions[1],
 
631
  ],
632
  outputs=output,
633
  fn=generate_image,