Update app.py
Browse files32 unmodified lines333435363738394041424344454647484950515253120 unmodified lines17417517617717817918032 unmodified linesfrom feat import Detectordef _calculate_md5(fpath: str, chunk_size: int = 1024 * 1024) -> str:# Setting the `usedforsecurity` flag does not change anything about the functionality, but indicates that we are# not using the MD5 checksum for cryptography. This enables its usage in restricted environments like FIPS. Without# it torchvision.datasets is unusable in these environments since we perform a MD5 check everywhere.if sys.version_info >= (3, 9):md5 = hashlib.md5(usedforsecurity=True)else:md5 = hashlib.md5()with open(fpath, "rb") as f:while chunk := f.read(chunk_size):md5.update(chunk)return md5.hexdigest()os.environ["TWILIO_ACCOUNT_SID"] = "ACf1e76f3fd6e9cbca940decc4ed443c20"os.environ["TWILIO_AUTH_TOKEN"] = "5cadf5cc7120dd995f11b3dc57e46d52"120 unmodified lines</style>""", unsafe_allow_html=True)detector = Detector(face_model="retinaface", landmark_model= "pfld", au_model="xgb", facepose_model="img2pose", emotion_model="resmasknet")source = "Webcam"recog = True32 unmodified lines333435363738120 unmodified lines15916016116216316416532 unmodified linesfrom feat import Detectoros.environ["TWILIO_ACCOUNT_SID"] = "ACf1e76f3fd6e9cbca940decc4ed443c20"os.environ["TWILIO_AUTH_TOKEN"] = "5cadf5cc7120dd995f11b3dc57e46d52"120 unmodified lines</style>""", unsafe_allow_html=True)detector = Detector(face_model="retinaface", landmark_model= "pfld")source = "Webcam"recog = True
app.py+1-16