Ahsen Khaliq commited on
Commit
43d1c17
1 Parent(s): 9e60d26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -46,10 +46,8 @@ def inference(video, text):
46
  ret, frame = capture.read()
47
 
48
  # Convert it to a PIL image (required for CLIP) and store it
49
- if ret == True:
50
- video_frames.append(Image.fromarray(frame[:, :, ::-1]))
51
- else:
52
- break
53
 
54
  # Print some statistics
55
  print(f"Frames extracted: {len(video_frames)}")
 
46
  ret, frame = capture.read()
47
 
48
  # Convert it to a PIL image (required for CLIP) and store it
49
+ video_frames.append(Image.fromarray(frame[:, :, ::-1]))
50
+
 
 
51
 
52
  # Print some statistics
53
  print(f"Frames extracted: {len(video_frames)}")