add examples
Browse files- app.py +3 -1
- scifi_man1.jpg +0 -0
app.py
CHANGED
@@ -94,6 +94,7 @@ def remove_background(input_image, bg_color, model_choice, alpha_matting, post_p
|
|
94 |
logging.error(f"An error occurred: {e}")
|
95 |
return None, None
|
96 |
|
|
|
97 |
# Gradio interface
|
98 |
iface = gr.Interface(
|
99 |
fn=remove_background,
|
@@ -114,7 +115,8 @@ iface = gr.Interface(
|
|
114 |
gr.Image(type="pil", label="Output Image"),
|
115 |
gr.File(label="Download the output image")
|
116 |
],
|
117 |
-
|
|
|
118 |
description="Upload an image to remove the background. Customize the result with different options, including background color, model selection, alpha matting, and more.",
|
119 |
allow_flagging="never",
|
120 |
)
|
|
|
94 |
logging.error(f"An error occurred: {e}")
|
95 |
return None, None
|
96 |
|
97 |
+
examples =['scifi_man1.jpg', 'scifi_man2.jpeg', 'scifi_man3.png']
|
98 |
# Gradio interface
|
99 |
iface = gr.Interface(
|
100 |
fn=remove_background,
|
|
|
115 |
gr.Image(type="pil", label="Output Image"),
|
116 |
gr.File(label="Download the output image")
|
117 |
],
|
118 |
+
examples=examples,
|
119 |
+
title="Advanced Background Remover v2.7",
|
120 |
description="Upload an image to remove the background. Customize the result with different options, including background color, model selection, alpha matting, and more.",
|
121 |
allow_flagging="never",
|
122 |
)
|
scifi_man1.jpg
ADDED
![]() |