Skip to content

Commit 56a87cb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9df5ec4 commit 56a87cb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
+9-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
#Uploading video to colab for object detection
1+
# Uploading video to colab for object detection
22
import cv2
33
from google.colab import files
44
from google.colab.patches import cv2_imshow
55

66
uploaded = files.upload()
77

88
yourvideo = list(uploaded.keys())[0]
9-
#once run, you will be promoted to select the video for object detection.
9+
# once run, you will be promoted to select the video for object detection.
1010

11-
#next cell, I like to break my code up so I can check for errors
12-
with open(yourvide, 'wb') as f:
13-
f.write(uploaded[yourvideo]) #this write it to a file in Colab's runtime temporary file system
11+
# next cell, I like to break my code up so I can check for errors
12+
with open(yourvide, "wb") as f:
13+
f.write(
14+
uploaded[yourvideo]
15+
) # this write it to a file in Colab's runtime temporary file system
1416

15-
#preparing video for CV2 library
17+
# preparing video for CV2 library
1618
video = cv2.VideoCapture(yourvideo)
1719
if not video.isOpened():
1820
print("Error opening video file")
1921
else:
20-
print("Video successfully loaded and ready")
21-
22-
22+
print("Video successfully loaded and ready")

0 commit comments

Comments
 (0)