SS8297 commited on
Commit
fe044a1
·
1 Parent(s): 03a995e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -16
app.py CHANGED
@@ -33,21 +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
-
50
-
51
  os.environ["TWILIO_ACCOUNT_SID"] = "ACf1e76f3fd6e9cbca940decc4ed443c20"
52
  os.environ["TWILIO_AUTH_TOKEN"] = "5cadf5cc7120dd995f11b3dc57e46d52"
53
 
@@ -174,7 +159,7 @@ st.markdown("""
174
  </style>
175
  """, unsafe_allow_html=True)
176
 
177
- detector = Detector(face_model="retinaface", landmark_model= "pfld", au_model="xgb", facepose_model="img2pose", emotion_model="resmasknet")
178
  source = "Webcam"
179
  recog = True
180
 
 
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")
163
  source = "Webcam"
164
  recog = True
165