israelweiss commited on
Commit
eaaba91
1 Parent(s): ca9ec31

no height limit in display

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -90,9 +90,9 @@ div#share-btn-container > div {flex-direction: row;background: black;align-items
90
  justify-content: center;
91
  }
92
  #output-img img, #image_upload img {
93
- object-fit: contain;
94
  width: 100%;
95
- height: auto;
96
  }
97
  #prompt-container{margin-top:-18px;}
98
  #prompt-container .form{border-top-left-radius: 0;border-top-right-radius: 0}
@@ -122,7 +122,7 @@ with image_blocks as demo:
122
  btn = gr.Button("Erase!", elem_id="run_button")
123
 
124
  with gr.Column():
125
- image_out = gr.Image(label="Output", elem_id="output-img", height=400)
126
 
127
  # Button click will trigger the inpainting function (no prompt required)
128
  btn.click(fn=predict, inputs=[image], outputs=[image_out], api_name='run')
 
90
  justify-content: center;
91
  }
92
  #output-img img, #image_upload img {
93
+ object-fit: contain; /* Ensure aspect ratio is preserved */
94
  width: 100%;
95
+ height: auto; /* Let height adjust automatically */
96
  }
97
  #prompt-container{margin-top:-18px;}
98
  #prompt-container .form{border-top-left-radius: 0;border-top-right-radius: 0}
 
122
  btn = gr.Button("Erase!", elem_id="run_button")
123
 
124
  with gr.Column():
125
+ image_out = gr.Image(label="Output", elem_id="output-img")
126
 
127
  # Button click will trigger the inpainting function (no prompt required)
128
  btn.click(fn=predict, inputs=[image], outputs=[image_out], api_name='run')