Ahsen Khaliq commited on
Commit
6543717
1 Parent(s): bb11fa4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -27,10 +27,11 @@ def inference(video, text):
27
  # Read the current frame
28
  ret, frame = capture.read()
29
  while ret:
30
- ret,frame = capture.read()
31
- print('Read a new frame: ', ret)
32
- current_frame += 1
33
- video_frames.append(Image.fromarray(frame[:, :, ::-1]))
 
34
 
35
 
36
  # Print some statistics
 
27
  # Read the current frame
28
  ret, frame = capture.read()
29
  while ret:
30
+ if ret:
31
+ ret,frame = capture.read()
32
+ print('Read a new frame: ', ret)
33
+ current_frame += 1
34
+ video_frames.append(Image.fromarray(frame[:, :, ::-1]))
35
 
36
 
37
  # Print some statistics