Omnibus commited on
Commit
87635c2
1 Parent(s): 00cd4ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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("""Fast Background Removal by: <a href='https://github.com/danielgatis/rembg' target='_blank'>Github Repo: danielgatis/rembg</a>""")
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,out_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()