atatakun commited on
Commit
c6aaa84
1 Parent(s): e919cff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -231,10 +231,10 @@ def inpaint(image, invert):
231
  color = HWC3(image["background"])
232
  # if(invert):
233
  # alpha = image["mask"][:, :, 0:1]
234
- # alpha = image["layers"][0][:, :, 0:1]
235
  # else:
236
  # alpha = 255 - image["mask"][:, :, 0:1]
237
- alpha = 255 - image["layers"][0]
238
  # result = np.concatenate([color, alpha], axis=2)
239
  result = alpha
240
  return [result]
@@ -243,7 +243,7 @@ def inpaint(image, invert):
243
  def predict(im):
244
  # return im["composite"]
245
  # return im["inputmask"] # bad
246
- return im["layers"][0][:, :, :]
247
 
248
  block = gr.Blocks().queue()
249
  with block:
 
231
  color = HWC3(image["background"])
232
  # if(invert):
233
  # alpha = image["mask"][:, :, 0:1]
234
+ alpha = image["layers"][0]
235
  # else:
236
  # alpha = 255 - image["mask"][:, :, 0:1]
237
+ # alpha = 255 - image["layers"][0]
238
  # result = np.concatenate([color, alpha], axis=2)
239
  result = alpha
240
  return [result]
 
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: