Vikas01 commited on
Commit
8510d34
1 Parent(s): 9eb9696

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -31,7 +31,11 @@ face_names = []
31
  s = True
32
 
33
  while True:
34
- _, frame = video_capture.read()
 
 
 
 
35
  small_frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25)
36
  rgb_small_frame = small_frame[:, :, ::-1]
37
 
 
31
  s = True
32
 
33
  while True:
34
+ ret, frame = video_capture.read()
35
+
36
+ if not ret:
37
+ continue
38
+
39
  small_frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25)
40
  rgb_small_frame = small_frame[:, :, ::-1]
41