Update app.py
Browse files
app.py
CHANGED
@@ -17,21 +17,12 @@ def remove_background(input_image):
|
|
17 |
return output_image
|
18 |
|
19 |
# Create the Gradio interface
|
20 |
-
|
21 |
-
|
22 |
-
gr.
|
23 |
-
|
24 |
-
|
25 |
-
|
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()
|