fffiloni commited on
Commit
a68d434
1 Parent(s): 1965ccc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -25,7 +25,7 @@ img_pipe.to(device)
25
 
26
  source_img = gr.ImagePaint(type="filepath", elem_id="source_container", label="new gradio color sketch (beta)")
27
 
28
- gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="auto")
29
 
30
  def resize(value,img):
31
  #baseheight = value
@@ -41,7 +41,7 @@ def infer(source_img, prompt):
41
 
42
  source_image = resize(512, source_img)
43
  source_image.save('source.png')
44
- images_list = img_pipe([prompt] * 2, init_image=source_image, strength=0.75)
45
  images = []
46
  safe_image = Image.open(r"unsafe.png")
47
  for i, image in enumerate(images_list["sample"]):
 
25
 
26
  source_img = gr.ImagePaint(type="filepath", elem_id="source_container", label="new gradio color sketch (beta)")
27
 
28
+ gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[1], height="auto")
29
 
30
  def resize(value,img):
31
  #baseheight = value
 
41
 
42
  source_image = resize(512, source_img)
43
  source_image.save('source.png')
44
+ images_list = img_pipe([prompt] * 1, init_image=source_image, strength=0.75)
45
  images = []
46
  safe_image = Image.open(r"unsafe.png")
47
  for i, image in enumerate(images_list["sample"]):