Update app.py
Browse files
app.py
CHANGED
|
@@ -3,14 +3,11 @@ from rembg import remove as rm
|
|
| 3 |
|
| 4 |
def rem_bg(input):
|
| 5 |
if input !=None:
|
| 6 |
-
|
| 7 |
-
out1 = gr.Pil.update(value=result,visible=True)
|
| 8 |
-
out2 = gr.Accordion.update(label="Original Image",open=False)
|
| 9 |
else:
|
| 10 |
out1 = None
|
| 11 |
-
out2 = None
|
| 12 |
pass
|
| 13 |
-
return out1
|
| 14 |
|
| 15 |
with gr.Blocks() as myface:
|
| 16 |
with gr.Row():
|
|
@@ -21,6 +18,6 @@ with gr.Blocks() as myface:
|
|
| 21 |
out_win=gr.Pil(label="Output",visible=False)
|
| 22 |
gr.Column()
|
| 23 |
|
| 24 |
-
in_win.change(rem_bg,in_win,
|
| 25 |
myface.queue(concurrency_count=120)
|
| 26 |
myface.launch()
|
|
|
|
| 3 |
|
| 4 |
def rem_bg(input):
|
| 5 |
if input !=None:
|
| 6 |
+
out1=rm(input)
|
|
|
|
|
|
|
| 7 |
else:
|
| 8 |
out1 = None
|
|
|
|
| 9 |
pass
|
| 10 |
+
return out1
|
| 11 |
|
| 12 |
with gr.Blocks() as myface:
|
| 13 |
with gr.Row():
|
|
|
|
| 18 |
out_win=gr.Pil(label="Output",visible=False)
|
| 19 |
gr.Column()
|
| 20 |
|
| 21 |
+
in_win.change(rem_bg,in_win,out_win)
|
| 22 |
myface.queue(concurrency_count=120)
|
| 23 |
myface.launch()
|