Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,7 +72,8 @@ def process(image):
|
|
| 72 |
new_im = Image.new("RGBA", pil_im.size, (0,0,0,0))
|
| 73 |
new_im.paste(orig_image, mask=pil_im)
|
| 74 |
|
| 75 |
-
return
|
|
|
|
| 76 |
|
| 77 |
|
| 78 |
# block = gr.Blocks().queue()
|
|
@@ -110,8 +111,9 @@ gr.HTML('''
|
|
| 110 |
title = "Background Removal"
|
| 111 |
description = "Remove Image Background"
|
| 112 |
examples = [['./input.jpg'],]
|
| 113 |
-
output = ImageSlider(position=0.5,label='Image without background', type="pil", show_download_button=True)
|
| 114 |
-
demo = gr.Interface(fn=process,inputs="image", outputs=output, examples=examples, title=title, description=description)
|
|
|
|
| 115 |
|
| 116 |
if __name__ == "__main__":
|
| 117 |
demo.launch(share=False)
|
|
|
|
| 72 |
new_im = Image.new("RGBA", pil_im.size, (0,0,0,0))
|
| 73 |
new_im.paste(orig_image, mask=pil_im)
|
| 74 |
|
| 75 |
+
return new_im
|
| 76 |
+
# return [orig_image, new_im]
|
| 77 |
|
| 78 |
|
| 79 |
# block = gr.Blocks().queue()
|
|
|
|
| 111 |
title = "Background Removal"
|
| 112 |
description = "Remove Image Background"
|
| 113 |
examples = [['./input.jpg'],]
|
| 114 |
+
# output = ImageSlider(position=0.5,label='Image without background', type="pil", show_download_button=True)
|
| 115 |
+
# demo = gr.Interface(fn=process,inputs="image", outputs=output, examples=examples, title=title, description=description)
|
| 116 |
+
demo = gr.Interface(fn=process,inputs="image", outputs="image", examples=examples, title=title, description=description)
|
| 117 |
|
| 118 |
if __name__ == "__main__":
|
| 119 |
demo.launch(share=False)
|