Manjushri commited on
Commit
7e96635
1 Parent(s): 95822c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,7 +16,7 @@ def resize(value,img):
16
  return img
17
 
18
  def predict(source_img, prompt):
19
- imageio.imwrite("data.png", source_img['upload'])
20
  imageio.imwrite("data_mask.png", source_img["mask"])
21
  src = resize(768, "data.png")
22
  src.save("src.png")
@@ -27,7 +27,7 @@ def predict(source_img, prompt):
27
 
28
  title="SDXL Turbo Inpainting CPU"
29
  description="Inpainting with SDXL Turbo <br><br> <b>Please use square .png image as input, 512x512, 768x768, or 1024x1024</b>"
30
- gr.Interface(fn=predict, inputs=[gr.ImageEditor(sources=("upload"), brush=gr.Brush(colors=["#000000"]), label='Source Image'),
31
  gr.Textbox(label='What you want the AI to Generate, 77 Token limit')],
32
  outputs='image',
33
  title=title,
 
16
  return img
17
 
18
  def predict(source_img, prompt):
19
+ imageio.imwrite("data.png", source_img['image'])
20
  imageio.imwrite("data_mask.png", source_img["mask"])
21
  src = resize(768, "data.png")
22
  src.save("src.png")
 
27
 
28
  title="SDXL Turbo Inpainting CPU"
29
  description="Inpainting with SDXL Turbo <br><br> <b>Please use square .png image as input, 512x512, 768x768, or 1024x1024</b>"
30
+ gr.Interface(fn=predict, inputs=[gr.Image(sources=("upload"), tools='sketch', label='Source Image'),
31
  gr.Textbox(label='What you want the AI to Generate, 77 Token limit')],
32
  outputs='image',
33
  title=title,