hassan526 commited on
Commit
7a3447b
1 Parent(s): b650ee9

Update app.py

Browse files

add new images in code,

Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -161,18 +161,6 @@ def get_attributes(json):
161
  <td>{gender}</td>
162
  <td></td><td></td>
163
  </tr>
164
- <tr>
165
- <td>Left Eye</td>
166
- <td>{left_eye}</td>
167
- <td>{"{:.4f}".format(attr.get('eye_left'))}</td>
168
- <td>{open_eye_thr}</td>
169
- </tr>
170
- <tr>
171
- <td>Right Eye</td>
172
- <td>{right_eye}</td>
173
- <td>{"{:.4f}".format(attr.get('eye_right'))}</td>
174
- <td>{open_eye_thr}</td>
175
- </tr>
176
  <tr>
177
  <td>Age</td>
178
  <td>{int(age)}</td>
@@ -197,6 +185,18 @@ def get_attributes(json):
197
  <td>Emotion</td>
198
  <td>{emotion}</td>
199
  <td></td><td></td>
 
 
 
 
 
 
 
 
 
 
 
 
200
  </tr>
201
  <tr>
202
  <td>Mask</td>
@@ -451,11 +451,11 @@ with gr.Blocks(css=css) as demo:
451
 
452
  compare_face_button.click(compare_face, inputs=[compare_face_input1, compare_face_input2], outputs=[face_output1, face_output2, compare_result, similarity_markdown])
453
 
454
- with gr.Tab("Face Analysis"):
455
  with gr.Row():
456
  with gr.Column(scale=1):
457
  face_input = gr.Image(label="Image", type='filepath', elem_classes="example-image")
458
- gr.Examples(['examples/1.jpg', 'examples/2.jpg', 'examples/3.jpg', 'examples/4.jpg', 'examples/5.jpg', 'examples/6.jpg', 'examples/7.jpg', 'examples/8.jpg'],
459
  inputs=face_input)
460
 
461
  with gr.Blocks():
 
161
  <td>{gender}</td>
162
  <td></td><td></td>
163
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
164
  <tr>
165
  <td>Age</td>
166
  <td>{int(age)}</td>
 
185
  <td>Emotion</td>
186
  <td>{emotion}</td>
187
  <td></td><td></td>
188
+ </tr>
189
+ <tr>
190
+ <td>Left Eye</td>
191
+ <td>{left_eye}</td>
192
+ <td>{"{:.4f}".format(attr.get('eye_left'))}</td>
193
+ <td>{open_eye_thr}</td>
194
+ </tr>
195
+ <tr>
196
+ <td>Right Eye</td>
197
+ <td>{right_eye}</td>
198
+ <td>{"{:.4f}".format(attr.get('eye_right'))}</td>
199
+ <td>{open_eye_thr}</td>
200
  </tr>
201
  <tr>
202
  <td>Mask</td>
 
451
 
452
  compare_face_button.click(compare_face, inputs=[compare_face_input1, compare_face_input2], outputs=[face_output1, face_output2, compare_result, similarity_markdown])
453
 
454
+ with gr.Tab("Face Liveness, Analysis"):
455
  with gr.Row():
456
  with gr.Column(scale=1):
457
  face_input = gr.Image(label="Image", type='filepath', elem_classes="example-image")
458
+ gr.Examples(['examples/att_1.jpg', 'examples/att_2.jpg', 'examples/att_3.jpg', 'examples/att_4.jpg', 'examples/att_5.jpg', 'examples/att_6.jpg', 'examples/att_7.jpg', 'examples/att_8.jpg', 'examples/att_9.jpg', 'examples/att_10.jpg'],
459
  inputs=face_input)
460
 
461
  with gr.Blocks():