Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
6543717
1
Parent(s):
bb11fa4
Update app.py
Browse files
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
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
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
|