Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -336,6 +336,12 @@ button.primary:hover {
|
|
| 336 |
max-width: 100%;
|
| 337 |
object-fit: contain;
|
| 338 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 339 |
"""
|
| 340 |
|
| 341 |
with gr.Blocks(theme=gr.themes.Soft(), css=custom_css) as demo:
|
|
@@ -373,8 +379,8 @@ button.primary:hover {
|
|
| 373 |
|
| 374 |
with gr.Column(scale=1, elem_classes="result-section"):
|
| 375 |
gr.HTML('<div class="section-header"><h3>๐จ 2. Results</h3></div>')
|
| 376 |
-
with gr.
|
| 377 |
-
image_output = gr.Image(label="๐ผ๏ธ Generated Image", type="pil", show_download_button=True,
|
| 378 |
recapped_prompt_output = gr.Textbox(label="๐ Final Prompt Used", lines=5, interactive=False)
|
| 379 |
status_output = gr.Textbox(label="๐ Status Log", lines=4, interactive=False)
|
| 380 |
|
|
|
|
| 336 |
max-width: 100%;
|
| 337 |
object-fit: contain;
|
| 338 |
}
|
| 339 |
+
|
| 340 |
+
.preserve-aspect-ratio img {
|
| 341 |
+
object-fit: contain !important;
|
| 342 |
+
width: auto !important;
|
| 343 |
+
max-height: 512px !important;
|
| 344 |
+
}
|
| 345 |
"""
|
| 346 |
|
| 347 |
with gr.Blocks(theme=gr.themes.Soft(), css=custom_css) as demo:
|
|
|
|
| 379 |
|
| 380 |
with gr.Column(scale=1, elem_classes="result-section"):
|
| 381 |
gr.HTML('<div class="section-header"><h3>๐จ 2. Results</h3></div>')
|
| 382 |
+
with gr.Group(elem_classes=["image-output-container"]):
|
| 383 |
+
image_output = gr.Image(label="๐ผ๏ธ Generated Image", type="pil", show_download_button=True, height=512, elem_classes=["preserve-aspect-ratio"])
|
| 384 |
recapped_prompt_output = gr.Textbox(label="๐ Final Prompt Used", lines=5, interactive=False)
|
| 385 |
status_output = gr.Textbox(label="๐ Status Log", lines=4, interactive=False)
|
| 386 |
|