Spaces:
Runtime error
Runtime error
Commit
·
7d9d40d
1
Parent(s):
bab769d
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def Attandance(video):
|
|
36 |
cap = cv2.VideoCapture(video)
|
37 |
index=1
|
38 |
while True:
|
39 |
-
|
40 |
ret, frame = cap.read()
|
41 |
#faces = cv2.resize(frame, (0, 0), None, 0.25, 0.25)
|
42 |
faces = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
@@ -56,7 +56,8 @@ def Attandance(video):
|
|
56 |
|
57 |
if cv2.waitKey(1) == 2:
|
58 |
break
|
59 |
-
|
|
|
60 |
return ''.join(name)
|
61 |
|
62 |
demo=gr.Interface(fn=Attandance,
|
|
|
36 |
cap = cv2.VideoCapture(video)
|
37 |
index=1
|
38 |
while True:
|
39 |
+
try:
|
40 |
ret, frame = cap.read()
|
41 |
#faces = cv2.resize(frame, (0, 0), None, 0.25, 0.25)
|
42 |
faces = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
|
|
56 |
|
57 |
if cv2.waitKey(1) == 2:
|
58 |
break
|
59 |
+
except:
|
60 |
+
pass
|
61 |
return ''.join(name)
|
62 |
|
63 |
demo=gr.Interface(fn=Attandance,
|