Spaces:
Running
Running
Update app.py
Browse files
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['
|
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.
|
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,
|