Spaces:
Runtime error
Runtime error
Commit
·
5108c70
1
Parent(s):
d9161a1
Update app.py
Browse files
app.py
CHANGED
@@ -159,12 +159,15 @@ def main():
|
|
159 |
#st.write('filepath : ',filepath)
|
160 |
st.success("Click again to retry or try a different video by uploading")
|
161 |
nbperson, listhead = extract_heads(filepath, frame0)
|
|
|
|
|
|
|
|
|
162 |
display_heads_(nbperson, listhead)
|
163 |
|
164 |
st.subheader('Continue to face analysis :')
|
165 |
|
166 |
-
|
167 |
-
st.write('age : ', obj['age'], 'gender : ', obj['gender'])
|
168 |
|
169 |
return
|
170 |
|
|
|
159 |
#st.write('filepath : ',filepath)
|
160 |
st.success("Click again to retry or try a different video by uploading")
|
161 |
nbperson, listhead = extract_heads(filepath, frame0)
|
162 |
+
|
163 |
+
obj = DeepFace.analyze(img_path = listhead[1], actions = ['age', 'gender'], enforce_detection=False)
|
164 |
+
st.write('age : ', obj['age'], 'gender : ', obj['gender'])
|
165 |
+
|
166 |
display_heads_(nbperson, listhead)
|
167 |
|
168 |
st.subheader('Continue to face analysis :')
|
169 |
|
170 |
+
|
|
|
171 |
|
172 |
return
|
173 |
|