Spaces:
Runtime error
Runtime error
Make it forgiving for small monitors and fix it on mobile (#1)
Browse files- Make it forgiving for small monitors and fix it on mobile (da1d245e60a4378d4cc65d5ce74fee4e831bb2b9)
Co-authored-by: Apolinário from multimodal AI art <multimodalart@users.noreply.huggingface.co>
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(
|
| 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,)
|