amirgame197 commited on
Commit
5cb9d7a
·
verified ·
1 Parent(s): 69a2ec7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -12,6 +12,8 @@ def doo(video):
12
 
13
  processed_frames = [] # List to store processed frames
14
 
 
 
15
  while cap.isOpened():
16
  ret, frame = cap.read() # Read video
17
 
@@ -31,8 +33,9 @@ def doo(video):
31
  if processed_frame.shape[2] != 3:
32
  raise ValueError("Processed frame does not have 3 channels (RGB)")
33
 
34
- # Append the processed frame to the list
35
- processed_frames.append(processed_frame)
 
36
 
37
  cap.release()
38
 
 
12
 
13
  processed_frames = [] # List to store processed frames
14
 
15
+ frame_index = 0 # Initialize frame index
16
+
17
  while cap.isOpened():
18
  ret, frame = cap.read() # Read video
19
 
 
33
  if processed_frame.shape[2] != 3:
34
  raise ValueError("Processed frame does not have 3 channels (RGB)")
35
 
36
+ # Append the processed frame (as a tuple) to the list
37
+ processed_frames.append((frame_index, processed_frame))
38
+ frame_index += 1
39
 
40
  cap.release()
41