Turing311 commited on
Commit
950e710
1 Parent(s): d053308
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -19,9 +19,9 @@ def get_attributes(json):
19
  mask.append('SUNGLASSES')
20
 
21
  eye = []
22
- if attr.get('eye_left') >= 0.5:
23
  eye.append('LEFT')
24
- if attr.get('eye_right') >= 0.5:
25
  eye.append('RIGHT')
26
  facehair = attr.get('facial_hair')
27
  haircolor = attr.get('hair_color')
@@ -200,7 +200,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue=primary_color, secondary_hue=
200
  yaw2 = gr.Number(0, label="Yaw")
201
  quality2 = gr.Number(0, label="Quality")
202
 
203
- compare_result_output = gr.JSON(label='Result', visible=True)
204
 
205
  compare_face_button.click(compare_face, inputs=[compare_face_input1, compare_face_input2], outputs=[compare_result_output, compare_face_output, compare_result,
206
  liveness1, age1, gender1, emotion1, ethnicity1, mask1, eye1, facehair1, haircolor1, hairtype1, headwear1, activity1, pitch1, roll1, yaw1, quality1,
 
19
  mask.append('SUNGLASSES')
20
 
21
  eye = []
22
+ if attr.get('eye_left') >= 0.3:
23
  eye.append('LEFT')
24
+ if attr.get('eye_right') >= 0.3:
25
  eye.append('RIGHT')
26
  facehair = attr.get('facial_hair')
27
  haircolor = attr.get('hair_color')
 
200
  yaw2 = gr.Number(0, label="Yaw")
201
  quality2 = gr.Number(0, label="Quality")
202
 
203
+ compare_result_output = gr.JSON(label='Result', visible=False)
204
 
205
  compare_face_button.click(compare_face, inputs=[compare_face_input1, compare_face_input2], outputs=[compare_result_output, compare_face_output, compare_result,
206
  liveness1, age1, gender1, emotion1, ethnicity1, mask1, eye1, facehair1, haircolor1, hairtype1, headwear1, activity1, pitch1, roll1, yaw1, quality1,