pn23 commited on
Commit
21a4d29
·
verified ·
1 Parent(s): ef13e0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -10,7 +10,9 @@ temporary_location = False
10
 
11
  def capture_video_frames():
12
  video_file = st.file_uploader('video', type = ['mp4'])
13
- while True:
 
 
14
  ret, frame = cap.read()
15
  yield frame
16
 
 
10
 
11
  def capture_video_frames():
12
  video_file = st.file_uploader('video', type = ['mp4'])
13
+ cap = cv2.VideoCapture(video_file)
14
+
15
+ while cap.isOpened():
16
  ret, frame = cap.read()
17
  yield frame
18