hassan526 commited on
Commit
86c53ae
·
verified ·
1 Parent(s): c1e466f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -21,6 +21,12 @@ css = """
21
  object-fit: contain; /* Preserve aspect ratio while fitting the image within the container */
22
  }
23
 
 
 
 
 
 
 
24
  .face-row {
25
  display: flex;
26
  justify-content: space-around; /* Distribute space evenly between elements */
@@ -448,11 +454,11 @@ with gr.Blocks(css=css) as demo:
448
  with gr.Column(scale=1):
449
  compare_face_input1 = gr.Image(label="Image1", type='filepath', elem_classes="example-image")
450
  gr.Examples(['examples/1.jpg', 'examples/2.jpg', 'examples/3.jpg', 'examples/4.jpg'],
451
- inputs=compare_face_input1)
452
  with gr.Column(scale=1):
453
  compare_face_input2 = gr.Image(label="Image2", type='filepath', elem_classes="example-image")
454
  gr.Examples(['examples/5.jpg', 'examples/6.jpg', 'examples/7.jpg', 'examples/8.jpg'],
455
- inputs=compare_face_input2)
456
 
457
  with gr.Blocks():
458
  with gr.Column(scale=1, min_width=400, elem_classes="block-background"):
 
21
  object-fit: contain; /* Preserve aspect ratio while fitting the image within the container */
22
  }
23
 
24
+ .horizontal-examples {
25
+ display: flex;
26
+ flex-direction: row; /* Ensure items are in a row */
27
+ justify-content: space-between; /* Adjust spacing */
28
+ }
29
+
30
  .face-row {
31
  display: flex;
32
  justify-content: space-around; /* Distribute space evenly between elements */
 
454
  with gr.Column(scale=1):
455
  compare_face_input1 = gr.Image(label="Image1", type='filepath', elem_classes="example-image")
456
  gr.Examples(['examples/1.jpg', 'examples/2.jpg', 'examples/3.jpg', 'examples/4.jpg'],
457
+ inputs=compare_face_input1, elem_classes="horizontal-examples")
458
  with gr.Column(scale=1):
459
  compare_face_input2 = gr.Image(label="Image2", type='filepath', elem_classes="example-image")
460
  gr.Examples(['examples/5.jpg', 'examples/6.jpg', 'examples/7.jpg', 'examples/8.jpg'],
461
+ inputs=compare_face_input2, elem_classes="horizontal-examples")
462
 
463
  with gr.Blocks():
464
  with gr.Column(scale=1, min_width=400, elem_classes="block-background"):