risunobushi commited on
Commit
5cbc0b0
·
1 Parent(s): 2f6e42e

Fix layout: arrange examples left, inputs, result, controls right

Browse files
Files changed (1) hide show
  1. app.py +19 -24
app.py CHANGED
@@ -288,19 +288,8 @@ with gr.Blocks(title="YOURMIRROR.IO - SM4LL-VTON Demo") as demo:
288
  IMG_SIZE = 256
289
 
290
  with gr.Row():
291
- # Left spacer column
292
  with gr.Column(scale=1):
293
- pass
294
-
295
- # Base image column
296
- with gr.Column(scale=1):
297
- base_in = gr.Image(
298
- label="Base Image",
299
- type="pil",
300
- height=IMG_SIZE,
301
- width=IMG_SIZE,
302
- )
303
- # Base image examples directly below
304
  gr.Markdown("### base image examples")
305
  with gr.Row():
306
  base_example_1 = gr.Image(
@@ -324,16 +313,7 @@ with gr.Blocks(title="YOURMIRROR.IO - SM4LL-VTON Demo") as demo:
324
  width=120,
325
  show_label=False,
326
  )
327
-
328
- # Product image column
329
- with gr.Column(scale=1):
330
- garment_in = gr.Image(
331
- label="Product Image",
332
- type="pil",
333
- height=IMG_SIZE,
334
- width=IMG_SIZE,
335
- )
336
- # Product image examples directly below
337
  gr.Markdown("### product examples")
338
  with gr.Row():
339
  product_example_1 = gr.Image(
@@ -358,7 +338,22 @@ with gr.Blocks(title="YOURMIRROR.IO - SM4LL-VTON Demo") as demo:
358
  show_label=False,
359
  )
360
 
361
- # Result column
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  with gr.Column(scale=2):
363
  result_out = gr.Image(
364
  label="Result",
@@ -366,7 +361,7 @@ with gr.Blocks(title="YOURMIRROR.IO - SM4LL-VTON Demo") as demo:
366
  width=512,
367
  )
368
 
369
- # Controls column
370
  with gr.Column(scale=1):
371
  workflow_selector = gr.Radio(
372
  choices=[
 
288
  IMG_SIZE = 256
289
 
290
  with gr.Row():
291
+ # Left column: Example images
292
  with gr.Column(scale=1):
 
 
 
 
 
 
 
 
 
 
 
293
  gr.Markdown("### base image examples")
294
  with gr.Row():
295
  base_example_1 = gr.Image(
 
313
  width=120,
314
  show_label=False,
315
  )
316
+
 
 
 
 
 
 
 
 
 
317
  gr.Markdown("### product examples")
318
  with gr.Row():
319
  product_example_1 = gr.Image(
 
338
  show_label=False,
339
  )
340
 
341
+ # Second column: Input fields
342
+ with gr.Column(scale=1):
343
+ base_in = gr.Image(
344
+ label="Base Image",
345
+ type="pil",
346
+ height=IMG_SIZE,
347
+ width=IMG_SIZE,
348
+ )
349
+ garment_in = gr.Image(
350
+ label="Product Image",
351
+ type="pil",
352
+ height=IMG_SIZE,
353
+ width=IMG_SIZE,
354
+ )
355
+
356
+ # Third column: Result
357
  with gr.Column(scale=2):
358
  result_out = gr.Image(
359
  label="Result",
 
361
  width=512,
362
  )
363
 
364
+ # Right column: Controls
365
  with gr.Column(scale=1):
366
  workflow_selector = gr.Radio(
367
  choices=[