Spaces:
Runtime error
Runtime error
Commit
·
7af7fa9
1
Parent(s):
3751358
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,18 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from rembg import remove
|
| 3 |
|
| 4 |
-
title = "
|
| 5 |
-
description = "
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
def segment(image):
|
| 9 |
return remove(image)
|
| 10 |
|
| 11 |
-
demo = gr.Interface(fn=segment, inputs="
|
| 12 |
demo.queue(concurrency_count=3)
|
| 13 |
-
demo.launch()
|
|
|
|
| 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 |
+
|
| 8 |
+
⚠️ Make sure your image is of good quality and has a clear background!
|
| 9 |
+
|
| 10 |
+
⚠️ Sometimes the background is not removed correctly, this is normal, because this is just a demo version!
|
| 11 |
+
"""
|
| 12 |
+
|
| 13 |
def segment(image):
|
| 14 |
return remove(image)
|
| 15 |
|
| 16 |
+
demo = gr.Interface(fn=segment, inputs = gr.Image(label="Input Image", interactive=True), outputs = gr.Image(label="Result Image"), title=title, description=description)
|
| 17 |
demo.queue(concurrency_count=3)
|
| 18 |
+
demo.launch(show_api=False)
|