Geek7 commited on
Commit
fbd1311
·
verified ·
1 Parent(s): 0d75573

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -15
app.py CHANGED
@@ -17,21 +17,12 @@ def remove_background(input_image):
17
  return output_image
18
 
19
  # Create the Gradio interface
20
- with gr.Blocks() as demo:
21
- gr.Markdown("# Background Removal Tool")
22
- gr.Interface(css="footer{display:none !important}")
23
- with gr.Row():
24
- input_image = gr.Image(type="pil", label="Upload an image")
25
- output_image = gr.Image(label="Processed Image",show_share_button=False)
26
-
27
- submit_button = gr.Button("Submit")
28
- submit_button.click(remove_background, inputs=input_image, outputs=output_image)
29
-
30
- # Optional: Add a clear button
31
- clear_button = gr.Button("Clear")
32
- def clear_images():
33
- return None
34
- clear_button.click(clear_images, inputs=None, outputs=input_image)
35
 
36
  # Launch the Gradio app
37
  demo.launch()
 
17
  return output_image
18
 
19
  # Create the Gradio interface
20
+ demo = gr.Interface(
21
+ fn=remove_background,
22
+ inputs=gr.Image(type="pil", label="Upload an image"),
23
+ outputs=gr.Image(label="Processed Image"),
24
+ css="footer {visibility: hidden}" # Hide the footer
25
+ )
 
 
 
 
 
 
 
 
 
26
 
27
  # Launch the Gradio app
28
  demo.launch()