Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,15 +66,22 @@ def process_image(image, num_steps=10, guidance_scale=1.0):
|
|
| 66 |
# }
|
| 67 |
# """
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
css = """
|
| 70 |
-
|
| 71 |
-
.image-container .fixed img,
|
| 72 |
-
.image-container .fixed {
|
| 73 |
object-fit: contain !important;
|
| 74 |
-
max-height: 400px !important;
|
| 75 |
}
|
| 76 |
"""
|
| 77 |
|
|
|
|
| 78 |
# Create Gradio interface
|
| 79 |
with gr.Blocks(title="Fibo-Edit-RMBG - Background Removal", css=css) as demo:
|
| 80 |
gr.Markdown("""
|
|
@@ -121,7 +128,8 @@ with gr.Blocks(title="Fibo-Edit-RMBG - Background Removal", css=css) as demo:
|
|
| 121 |
output_image = ImageSlider(
|
| 122 |
label="Result vs Original",
|
| 123 |
type="pil",
|
| 124 |
-
height=400
|
|
|
|
| 125 |
)
|
| 126 |
|
| 127 |
download_file = gr.File(label="Download PNG (with transparency)")
|
|
|
|
| 66 |
# }
|
| 67 |
# """
|
| 68 |
|
| 69 |
+
# css = """
|
| 70 |
+
# .image-container img,
|
| 71 |
+
# .image-container .fixed img,
|
| 72 |
+
# .image-container .fixed {
|
| 73 |
+
# object-fit: contain !important;
|
| 74 |
+
# max-height: 400px !important;
|
| 75 |
+
# }
|
| 76 |
+
# """
|
| 77 |
+
|
| 78 |
css = """
|
| 79 |
+
#output-slider img {
|
|
|
|
|
|
|
| 80 |
object-fit: contain !important;
|
|
|
|
| 81 |
}
|
| 82 |
"""
|
| 83 |
|
| 84 |
+
|
| 85 |
# Create Gradio interface
|
| 86 |
with gr.Blocks(title="Fibo-Edit-RMBG - Background Removal", css=css) as demo:
|
| 87 |
gr.Markdown("""
|
|
|
|
| 128 |
output_image = ImageSlider(
|
| 129 |
label="Result vs Original",
|
| 130 |
type="pil",
|
| 131 |
+
height=400,
|
| 132 |
+
elem_id="output-slider"
|
| 133 |
)
|
| 134 |
|
| 135 |
download_file = gr.File(label="Download PNG (with transparency)")
|