Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,24 +8,22 @@ def remove_background(image):
|
|
| 8 |
pillow_image = pipe(image)
|
| 9 |
return pillow_image
|
| 10 |
|
| 11 |
-
#
|
| 12 |
app = gr.Interface(
|
| 13 |
fn=remove_background,
|
| 14 |
-
inputs=gr.
|
| 15 |
-
outputs=gr.
|
| 16 |
title='Remove image background',
|
| 17 |
description='Remove backgrounds from photos automatically in seconds - 100% free, no watermarks, works on any device!'
|
| 18 |
)
|
| 19 |
|
| 20 |
-
#
|
| 21 |
app.css = """
|
| 22 |
-
footer {
|
|
|
|
| 23 |
.gradio-container {margin-bottom: 0 !important;}
|
| 24 |
"""
|
| 25 |
|
|
|
|
| 26 |
if __name__ == "__main__":
|
| 27 |
-
app.launch(
|
| 28 |
-
share=True, # Optional: Remove if you don't need sharing
|
| 29 |
-
show_api=False, # Hides the "Use via API" option
|
| 30 |
-
show_tips=False # Disables Gradio tips for cleaner UI
|
| 31 |
-
)
|
|
|
|
| 8 |
pillow_image = pipe(image)
|
| 9 |
return pillow_image
|
| 10 |
|
| 11 |
+
# Create interface
|
| 12 |
app = gr.Interface(
|
| 13 |
fn=remove_background,
|
| 14 |
+
inputs=gr.Image(type='pil'),
|
| 15 |
+
outputs=gr.Image(type='pil', format='png'),
|
| 16 |
title='Remove image background',
|
| 17 |
description='Remove backgrounds from photos automatically in seconds - 100% free, no watermarks, works on any device!'
|
| 18 |
)
|
| 19 |
|
| 20 |
+
# CSS to hide footer and adjust margins
|
| 21 |
app.css = """
|
| 22 |
+
footer {visibility: hidden !important;}
|
| 23 |
+
.gr-footer {display: none !important;}
|
| 24 |
.gradio-container {margin-bottom: 0 !important;}
|
| 25 |
"""
|
| 26 |
|
| 27 |
+
# Launch with minimal options
|
| 28 |
if __name__ == "__main__":
|
| 29 |
+
app.launch(share=True)
|
|
|
|
|
|
|
|
|
|
|
|