atatakun commited on
Commit
d4d116c
1 Parent(s): 8cd6c25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -233,7 +233,7 @@ def inpaint(image, invert):
233
  # else:
234
  # alpha = 255 - image["mask"][:, :, 0:1]
235
  # result = np.concatenate([color, alpha], axis=2)
236
- result = image
237
  return [result]
238
 
239
  block = gr.Blocks().queue()
@@ -262,6 +262,7 @@ with block:
262
  with gr.Row():
263
  with gr.Column():
264
  input_image = gr.ImageMask(sources="upload", type="numpy", height="auto")
 
265
  # input_image = gr.ImageEditor(sources="upload", type="numpy", height="auto", layers="False", brush=gr.Brush(colors=["#000000"]))
266
  # input_image = gr.Image(source='upload', type="numpy", tool="sketch", height=512)
267
  # resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
 
233
  # else:
234
  # alpha = 255 - image["mask"][:, :, 0:1]
235
  # result = np.concatenate([color, alpha], axis=2)
236
+ result = image["mask"]
237
  return [result]
238
 
239
  block = gr.Blocks().queue()
 
262
  with gr.Row():
263
  with gr.Column():
264
  input_image = gr.ImageMask(sources="upload", type="numpy", height="auto")
265
+ input_preview=gr.Image()
266
  # input_image = gr.ImageEditor(sources="upload", type="numpy", height="auto", layers="False", brush=gr.Brush(colors=["#000000"]))
267
  # input_image = gr.Image(source='upload', type="numpy", tool="sketch", height=512)
268
  # resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)