Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from rembg import remove
|
3 |
+
|
4 |
+
title = "Remove Background"
|
5 |
+
description = """
|
6 |
+
In this space, you can quickly remove background from images.
|
7 |
+
⚠️ Make sure your image is of good quality and has a clear background!
|
8 |
+
⚠️ Sometimes the background is not removed correctly, this is normal, because this is just a demo version!
|
9 |
+
"""
|
10 |
+
|
11 |
+
def segment(image):
|
12 |
+
return remove(image)
|
13 |
+
|
14 |
+
demo = gr.Interface(fn=segment, inputs = gr.Image(label="Input Image", interactive=True), outputs = gr.Image(label="Result Image"), title=title, description=description)
|
15 |
+
demo.launch(show_api=False)
|