multimodalart HF staff commited on
Commit
da1d245
1 Parent(s): 1d16802

Make it forgiving for small monitors and fix it on mobile

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -158,8 +158,8 @@ def choose(choice, embs, ys, calibrate_prompts):
158
  img, embs, ys, calibrate_prompts = next_image(embs, ys, calibrate_prompts)
159
  return img, embs, ys, calibrate_prompts
160
 
161
- css = "div#output-image {height: 768px !important; width: 768px !important; margin:auto;}"
162
- with gr.Blocks(css=css) as demo:
163
  embs = gr.State([])
164
  ys = gr.State([])
165
  calibrate_prompts = gr.State([
@@ -175,7 +175,7 @@ with gr.Blocks(css=css) as demo:
175
  ])
176
 
177
  with gr.Row(elem_id='output-image'):
178
- img = gr.Image(interactive=False, elem_id='output-image',)
179
  with gr.Row(equal_height=True):
180
  b3 = gr.Button(value='Dislike', interactive=False,)
181
  b2 = gr.Button(value='Neither', interactive=False,)
 
158
  img, embs, ys, calibrate_prompts = next_image(embs, ys, calibrate_prompts)
159
  return img, embs, ys, calibrate_prompts
160
 
161
+ #css = "div#output-image {height: 768px !important; width: 768px !important; margin:auto; max-width: 100% !important;}"
162
+ with gr.Blocks() as demo:
163
  embs = gr.State([])
164
  ys = gr.State([])
165
  calibrate_prompts = gr.State([
 
175
  ])
176
 
177
  with gr.Row(elem_id='output-image'):
178
+ img = gr.Image(interactive=False, elem_id='output-image',width=700)
179
  with gr.Row(equal_height=True):
180
  b3 = gr.Button(value='Dislike', interactive=False,)
181
  b2 = gr.Button(value='Neither', interactive=False,)