aashwinik commited on
Commit
7ebb572
1 Parent(s): 546f703

Update Face_Censoring.py

Browse files
Files changed (1) hide show
  1. Face_Censoring.py +4 -4
Face_Censoring.py CHANGED
@@ -2,10 +2,10 @@ import cv2
2
  import streamlit as st
3
  import tempfile
4
 
5
- #load models
6
- face_cascade=cv2.CascadeClassifier('XML\faces.xml')
7
- #tfile2 = tempfile.NamedTemporaryFile(delete=False)
8
- #tfile2.write(face_cascade.read("XML\faces.xml"))
9
 
10
  def censor_face(filePath):
11
 
 
2
  import streamlit as st
3
  import tempfile
4
 
5
+ try:
6
+ face_cascade = cv2.CascadeClassifier('XML\faces.xml')
7
+ except Exception:
8
+ st.write("Error loading cascade classifiers")
9
 
10
  def censor_face(filePath):
11