Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -18,9 +18,9 @@ def resize(value,img):
|
|
18 |
def predict(source_img, prompt, negative_prompt):
|
19 |
imageio.imwrite("data.png", source_img["image"])
|
20 |
imageio.imwrite("data_mask.png", source_img["mask"])
|
21 |
-
src = resize(
|
22 |
src.save("src.png")
|
23 |
-
mask = resize(
|
24 |
mask.save("mask.png")
|
25 |
image = pipe(prompt=prompt, negative_prompt=negative_prompt, image=src, mask_image=mask, num_inference_steps=5).images[0]
|
26 |
return image
|
|
|
18 |
def predict(source_img, prompt, negative_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")
|
23 |
+
mask = resize(768, "data_mask.png")
|
24 |
mask.save("mask.png")
|
25 |
image = pipe(prompt=prompt, negative_prompt=negative_prompt, image=src, mask_image=mask, num_inference_steps=5).images[0]
|
26 |
return image
|