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