Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,17 +7,22 @@ def rem_bg(input):
|
|
7 |
result=rm(input)
|
8 |
else:
|
9 |
pass
|
10 |
-
return gr.
|
11 |
|
12 |
with gr.Blocks() as myface:
|
13 |
gr.Markdown("""<center><h1>Fast Background Remover</h1><center>""")
|
14 |
-
gr.
|
15 |
-
with gr.
|
16 |
-
gr.
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
22 |
myface.queue(concurrency_count=120)
|
23 |
myface.launch()
|
|
|
7 |
result=rm(input)
|
8 |
else:
|
9 |
pass
|
10 |
+
return result, gr.Accordion.update("Original Image",open=False)
|
11 |
|
12 |
with gr.Blocks() as myface:
|
13 |
gr.Markdown("""<center><h1>Fast Background Remover</h1><center>""")
|
14 |
+
gr.Column()
|
15 |
+
with gr.Column():
|
16 |
+
with gr.Accordion("Details",open=False):
|
17 |
+
gr.Markdown("""<center><h3>Drop your image in the box, and the background will be removed.</h3><center><br>""")
|
18 |
+
gr.Markdown("""<center><h5>Background Removal by:<a href='https://github.com/danielgatis/rembg' target='_blank'>Github Repo: danielgatis/rembg</h3></a><center>""")
|
19 |
+
gr.Markdown("""<center><h5>Huggingface Space by: <a href='https://twitter.com/omnibusai' target='_blank'>Omnibus</h3></a><center>""")
|
20 |
|
21 |
+
with gr.Accordion("Input Image",open=True) as og:
|
22 |
+
in_win=gr.Pil(label="Input", interactive=True, batch=True, max_batch_size=20)
|
23 |
+
out_win=gr.Pil(label="Output")
|
24 |
+
gr.Column()
|
25 |
+
|
26 |
+
in_win.change(rem_bg,in_win,[out_win,og])
|
27 |
myface.queue(concurrency_count=120)
|
28 |
myface.launch()
|