Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,8 +54,8 @@ def process(image):
|
|
54 |
new_im = Image.new("RGBA", pil_im.size, (0,0,0,0))
|
55 |
new_im.paste(orig_image, mask=pil_im)
|
56 |
|
57 |
-
return new_im
|
58 |
-
|
59 |
|
60 |
|
61 |
# block = gr.Blocks().queue()
|
@@ -93,9 +93,9 @@ gr.HTML('''
|
|
93 |
title = "Background Removal"
|
94 |
description = "Remove Image Background"
|
95 |
examples = [['./input.jpg'],]
|
96 |
-
|
97 |
-
|
98 |
-
demo = gr.Interface(fn=process,inputs="image", outputs="image", examples=examples, title=title, description=description)
|
99 |
|
100 |
if __name__ == "__main__":
|
101 |
demo.launch(share=False)
|
|
|
54 |
new_im = Image.new("RGBA", pil_im.size, (0,0,0,0))
|
55 |
new_im.paste(orig_image, mask=pil_im)
|
56 |
|
57 |
+
# return new_im
|
58 |
+
return [orig_image, new_im]
|
59 |
|
60 |
|
61 |
# block = gr.Blocks().queue()
|
|
|
93 |
title = "Background Removal"
|
94 |
description = "Remove Image Background"
|
95 |
examples = [['./input.jpg'],]
|
96 |
+
output = ImageSlider(position=0.5,label='Image without background', type="pil", show_download_button=True)
|
97 |
+
demo = gr.Interface(fn=process,inputs="image", outputs=output, examples=examples, title=title, description=description)
|
98 |
+
# demo = gr.Interface(fn=process,inputs="image", outputs="image", examples=examples, title=title, description=description)
|
99 |
|
100 |
if __name__ == "__main__":
|
101 |
demo.launch(share=False)
|