koji commited on
Commit
bf3c7a8
·
1 Parent(s): d82e861

Add application file

Browse files
Files changed (2) hide show
  1. app.py +17 -0
  2. requirements.txt +1 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from rembg import remove
2
+ import gradio as gr
3
+ import os
4
+
5
+ def remove_bg(input_image):
6
+ output = remove(input_image)
7
+ return output
8
+
9
+ demo = gr.Interface(
10
+ remove_bg,
11
+ gr.Image(type="pil"),
12
+ "image",
13
+ )
14
+
15
+ if __name__ == "__main__":
16
+ demo.launch()
17
+
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ rembg