Spaces:
Running
on
Zero
Running
on
Zero
Enhance image display in app.py by adding 'object_fit' property to galleries for better image scaling and presentation
Browse files
app.py
CHANGED
|
@@ -207,15 +207,16 @@ with gr.Blocks(css=css) as demo:
|
|
| 207 |
input_images = gr.Gallery(label="Input Images",
|
| 208 |
show_label=False,
|
| 209 |
type="pil",
|
| 210 |
-
interactive=True
|
|
|
|
| 211 |
|
| 212 |
with gr.Column(scale=1):
|
| 213 |
gr.Markdown("### 2️⃣ Stage 1 (Base Body)")
|
| 214 |
-
stage1_result = gr.Gallery(label="Base Body", show_label=False, type="pil", interactive=False)
|
| 215 |
|
| 216 |
with gr.Column(scale=1):
|
| 217 |
gr.Markdown("### 3️⃣ Stage 2 (Guide Body)")
|
| 218 |
-
stage2_result = gr.Gallery(label="Guide Body", show_label=False, type="pil", interactive=False)
|
| 219 |
|
| 220 |
run_button = gr.Button("🚀 Convert to Guide Body", variant="primary", size="lg")
|
| 221 |
|
|
|
|
| 207 |
input_images = gr.Gallery(label="Input Images",
|
| 208 |
show_label=False,
|
| 209 |
type="pil",
|
| 210 |
+
interactive=True,
|
| 211 |
+
object_fit="contain")
|
| 212 |
|
| 213 |
with gr.Column(scale=1):
|
| 214 |
gr.Markdown("### 2️⃣ Stage 1 (Base Body)")
|
| 215 |
+
stage1_result = gr.Gallery(label="Base Body", show_label=False, type="pil", interactive=False, object_fit="contain")
|
| 216 |
|
| 217 |
with gr.Column(scale=1):
|
| 218 |
gr.Markdown("### 3️⃣ Stage 2 (Guide Body)")
|
| 219 |
+
stage2_result = gr.Gallery(label="Guide Body", show_label=False, type="pil", interactive=False, object_fit="contain")
|
| 220 |
|
| 221 |
run_button = gr.Button("🚀 Convert to Guide Body", variant="primary", size="lg")
|
| 222 |
|