Update app.py
Browse files
app.py
CHANGED
@@ -239,6 +239,10 @@ def inpaint(image, invert):
|
|
239 |
result = np.concatenate(color)
|
240 |
return [result]
|
241 |
|
|
|
|
|
|
|
|
|
242 |
block = gr.Blocks().queue()
|
243 |
with block:
|
244 |
gr.Markdown(DESCRIPTION)
|
@@ -265,6 +269,8 @@ with block:
|
|
265 |
with gr.Row():
|
266 |
with gr.Column():
|
267 |
input_image = gr.ImageMask(sources="upload", type="numpy", height="auto")
|
|
|
|
|
268 |
# input_image = gr.ImageEditor(sources="upload", type="numpy", height="auto", layers="False", brush=gr.Brush(colors=["#000000"]))
|
269 |
# input_image = gr.Image(source='upload', type="numpy", tool="sketch", height=512)
|
270 |
# resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
|
|
239 |
result = np.concatenate(color)
|
240 |
return [result]
|
241 |
|
242 |
+
|
243 |
+
def predict(im):
|
244 |
+
return im["composite"]
|
245 |
+
|
246 |
block = gr.Blocks().queue()
|
247 |
with block:
|
248 |
gr.Markdown(DESCRIPTION)
|
|
|
269 |
with gr.Row():
|
270 |
with gr.Column():
|
271 |
input_image = gr.ImageMask(sources="upload", type="numpy", height="auto")
|
272 |
+
im_preview = gr.Image()
|
273 |
+
input_image.change(predict, outputs=im_preview, inputs=input_image, show_progress="hidden")
|
274 |
# input_image = gr.ImageEditor(sources="upload", type="numpy", height="auto", layers="False", brush=gr.Brush(colors=["#000000"]))
|
275 |
# input_image = gr.Image(source='upload', type="numpy", tool="sketch", height=512)
|
276 |
# resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|