xp3857 commited on
Commit
e455506
·
1 Parent(s): 355b67e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -3,14 +3,11 @@ from rembg import remove as rm
3
 
4
  def rem_bg(input):
5
  if input !=None:
6
- result=rm(input)
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, out2
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,[out_win,og])
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()