Omnibus commited on
Commit
5884409
1 Parent(s): 45f8f9f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ rm_bg=gr.Interface.load("spaces/Omnibus/Image_segmentation")
3
+ def rem_bg(input):
4
+ if input !=None:
5
+ #pass
6
+ result=rm_bg(input)
7
+ else:
8
+ pass
9
+ return result
10
+ with gr.Blocks() as myface:
11
+ with gr.Row():
12
+ in_win=gr.Pil(label="Input", type="filepath", interactive=True, batch=True, max_batch_size=20)
13
+ out_win=gr.Pil(label="Output")
14
+ in_win.change(rem_bg,in_win,out_win)
15
+ myface.queue(concurrency_count=120)
16
+ myface.launch()