NassimeBejaia commited on
Commit
d3b2c1d
1 Parent(s): 69c94e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -54,11 +54,11 @@ def starter():
54
  st.text("")
55
  #st.success("Welcome! Please upload a video!")
56
 
57
- args = { 'HirakAlger' : '112vHirakAlger_09042021_s.mp4' }
58
  vid_upload = st.file_uploader(label= 'Welcome! Please upload a video! ', type = ['mp4', 'avi'])
59
 
60
- vid_open = "test_detection/data/"+args['HirakAlger'] if vid_upload is None else vid_upload
61
- vname = args['HirakAlger'] if vid_upload is None else vid_upload.name
62
 
63
  video = load_output_video(vid_open)
64
 
@@ -160,8 +160,8 @@ def main():
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
- if nbperson:
164
- if st.button('Continue to face analysis!'):
165
  os.system('pip install deepface')
166
  from deepface import DeepFace
167
  obj = DeepFace.analyze(img_path = listhead[1], actions = ['age', 'gender', 'race', 'emotion'])
 
54
  st.text("")
55
  #st.success("Welcome! Please upload a video!")
56
 
57
+ args = { 'ParisManif' : 'ParisManif.mp4' }
58
  vid_upload = st.file_uploader(label= 'Welcome! Please upload a video! ', type = ['mp4', 'avi'])
59
 
60
+ vid_open = "test_detection/data/"+args['ParisManif'] if vid_upload is None else vid_upload
61
+ vname = args['ParisManif'] if vid_upload is None else vid_upload.name
62
 
63
  video = load_output_video(vid_open)
64
 
 
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
+ if nbperson:
165
  os.system('pip install deepface')
166
  from deepface import DeepFace
167
  obj = DeepFace.analyze(img_path = listhead[1], actions = ['age', 'gender', 'race', 'emotion'])