Upload app.py
Browse files
app.py
CHANGED
@@ -216,10 +216,9 @@ model_inpaint = None
|
|
216 |
|
217 |
def inpaint(image):
|
218 |
# image = resize_image(img, res)
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
result = image["mask"][:, :, 0:1]
|
223 |
return [result]
|
224 |
|
225 |
block = gr.Blocks().queue()
|
|
|
216 |
|
217 |
def inpaint(image):
|
218 |
# image = resize_image(img, res)
|
219 |
+
color = HWC3(image["image"])
|
220 |
+
alpha = 255 - image["mask"][:, :, 0:1]
|
221 |
+
result = np.concatenate([color, alpha], axis=2)
|
|
|
222 |
return [result]
|
223 |
|
224 |
block = gr.Blocks().queue()
|