ecshreve commited on
Commit
a9296a9
1 Parent(s): 3a6ebef

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from rembg import remove
3
+
4
+ def process_image(input_img):
5
+ """Processes an image by removing its background and resizing it."""
6
+ img = remove(input_img)
7
+ return img
8
+
9
+ with gr.Blocks() as demo:
10
+ gr.Interface(
11
+ fn=process_image,
12
+ inputs = [gr.Image(label="Input Image", interactive=True)],
13
+ outputs = gr.Image(label="Upscaled Image"),
14
+ examples=[["images/sample1.png"]],
15
+ title="📸 Image Background Remover")
16
+
17
+ if __name__ == "__main__":
18
+ demo.launch()