fffiloni commited on
Commit
0372807
β€’
1 Parent(s): 51a8f26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def resize(height,img):
29
  img = img.resize((wsize,baseheight), Image.Resampling.LANCZOS)
30
  return img
31
 
32
- def predict(prompt, source_img):
33
  imageio.imwrite("data.png", source_img["image"])
34
  imageio.imwrite("data_mask.png", source_img["mask"])
35
 
@@ -51,4 +51,4 @@ def predict(prompt, source_img):
51
  custom_css="style.css"
52
  title="InPainting Stable Diffusion CPU"
53
  description="Inpainting Stable Diffusion example using CPU and HF token. <br />Warning: Slow process... ~5/10 min inference time. <b>NSFW filter enabled.</b><br />Please use 512*512 square image as input to avoid memory error !"
54
- gr.Interface(fn=predict, inputs=["text", source_img], outputs=gallery, css=custom_css, title=title, description=description).launch(enable_queue=True)
 
29
  img = img.resize((wsize,baseheight), Image.Resampling.LANCZOS)
30
  return img
31
 
32
+ def predict(source_img, prompt):
33
  imageio.imwrite("data.png", source_img["image"])
34
  imageio.imwrite("data_mask.png", source_img["mask"])
35
 
 
51
  custom_css="style.css"
52
  title="InPainting Stable Diffusion CPU"
53
  description="Inpainting Stable Diffusion example using CPU and HF token. <br />Warning: Slow process... ~5/10 min inference time. <b>NSFW filter enabled.</b><br />Please use 512*512 square image as input to avoid memory error !"
54
+ gr.Interface(fn=predict, inputs=[source_img, "text",], outputs=gallery, css=custom_css, title=title, description=description).launch(enable_queue=True)