SS8297 commited on
Commit
61f4e53
·
1 Parent(s): 0147384

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -14
app.py CHANGED
@@ -33,19 +33,6 @@ feat.pretrained.get_pretrained_models = _get_pretrained_models
33
 
34
  from feat import Detector
35
 
36
- def _calculate_md5(fpath: str, chunk_size: int = 1024 * 1024) -> str:
37
- # Setting the `usedforsecurity` flag does not change anything about the functionality, but indicates that we are
38
- # not using the MD5 checksum for cryptography. This enables its usage in restricted environments like FIPS. Without
39
- # it torchvision.datasets is unusable in these environments since we perform a MD5 check everywhere.
40
- if sys.version_info >= (3, 9):
41
- md5 = hashlib.md5(usedforsecurity=True)
42
- else:
43
- md5 = hashlib.md5()
44
- with open(fpath, "rb") as f:
45
- while chunk := f.read(chunk_size):
46
- md5.update(chunk)
47
- return md5.hexdigest()
48
-
49
  os.environ["TWILIO_ACCOUNT_SID"] = "ACf1e76f3fd6e9cbca940decc4ed443c20"
50
  os.environ["TWILIO_AUTH_TOKEN"] = "5cadf5cc7120dd995f11b3dc57e46d52"
51
 
@@ -172,7 +159,7 @@ st.markdown("""
172
  </style>
173
  """, unsafe_allow_html=True)
174
 
175
- detector = Detector(face_model="retinaface", landmark_model= "pfld")
176
  source = "Webcam"
177
  recog = True
178
 
 
33
 
34
  from feat import Detector
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  os.environ["TWILIO_ACCOUNT_SID"] = "ACf1e76f3fd6e9cbca940decc4ed443c20"
37
  os.environ["TWILIO_AUTH_TOKEN"] = "5cadf5cc7120dd995f11b3dc57e46d52"
38
 
 
159
  </style>
160
  """, unsafe_allow_html=True)
161
 
162
+ detector = Detector(face_model="retinaface", landmark_model= "pfld", au_model = "xgb", emotion_model = "resmasknet")
163
  source = "Webcam"
164
  recog = True
165