Ephemeral182 commited on
Commit
e8542ca
Β·
verified Β·
1 Parent(s): 5ec40b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -310,6 +310,12 @@ button.primary:hover {
310
  text-align: left !important;
311
  justify-content: flex-start !important;
312
  }
 
 
 
 
 
 
313
  """
314
 
315
  with gr.Blocks(theme=gr.themes.Soft(), css=custom_css) as demo:
@@ -345,7 +351,7 @@ button.primary:hover {
345
 
346
  with gr.Column(scale=1, elem_classes="result-section"):
347
  gr.HTML('<div class="section-header"><h3>🎨 2. Results</h3></div>')
348
- image_output = gr.Image(label="πŸ–ΌοΈ Generated Image", type="pil", show_download_button=True, height=512, container=False, scale=None)
349
  recapped_prompt_output = gr.Textbox(label="πŸ“ Final Prompt Used", lines=5, interactive=False)
350
  status_output = gr.Textbox(label="πŸ“Š Status Log", lines=4, interactive=False)
351
 
 
310
  text-align: left !important;
311
  justify-content: flex-start !important;
312
  }
313
+
314
+ .preserve-aspect-ratio img {
315
+ object-fit: contain !important;
316
+ width: auto !important;
317
+ max-height: 512px !important;
318
+ }
319
  """
320
 
321
  with gr.Blocks(theme=gr.themes.Soft(), css=custom_css) as demo:
 
351
 
352
  with gr.Column(scale=1, elem_classes="result-section"):
353
  gr.HTML('<div class="section-header"><h3>🎨 2. Results</h3></div>')
354
+ image_output = gr.Image(label="πŸ–ΌοΈ Generated Image", type="pil", show_download_button=True, height=512, container=False,elem_classes="preserve-aspect-ratio")
355
  recapped_prompt_output = gr.Textbox(label="πŸ“ Final Prompt Used", lines=5, interactive=False)
356
  status_output = gr.Textbox(label="πŸ“Š Status Log", lines=4, interactive=False)
357