Update app.py
Browse files
app.py
CHANGED
@@ -235,14 +235,15 @@ def inpaint(image, invert):
|
|
235 |
else:
|
236 |
# alpha = 255 - image["mask"][:, :, 0:1]
|
237 |
alpha = 255 - image["layers"][0][:, :, 0:1]
|
238 |
-
result = np.concatenate([color, alpha], axis=2)
|
|
|
239 |
return [result]
|
240 |
|
241 |
|
242 |
def predict(im):
|
243 |
# return im["composite"]
|
244 |
# return im["inputmask"] # bad
|
245 |
-
return im["layers"][0]
|
246 |
|
247 |
block = gr.Blocks().queue()
|
248 |
with block:
|
|
|
235 |
else:
|
236 |
# alpha = 255 - image["mask"][:, :, 0:1]
|
237 |
alpha = 255 - image["layers"][0][:, :, 0:1]
|
238 |
+
# result = np.concatenate([color, alpha], axis=2)
|
239 |
+
result = alpha
|
240 |
return [result]
|
241 |
|
242 |
|
243 |
def predict(im):
|
244 |
# return im["composite"]
|
245 |
# return im["inputmask"] # bad
|
246 |
+
return im["layers"][0][:, :, 0:1]
|
247 |
|
248 |
block = gr.Blocks().queue()
|
249 |
with block:
|