crrrr30 commited on
Commit
8f9e2b0
1 Parent(s): 3a02e2d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. demo.py +10 -0
demo.py CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  import os, cv2, time, math
2
  print("=> Loading libraries...")
3
  start = time.time()
 
1
+ import os
2
+ while True:
3
+ try:
4
+ import cv2
5
+ except ImportError:
6
+ print("Package cv2 not found. Attepting installation.")
7
+ os.system("pip install -U opencv-python &> /dev/null")
8
+ continue
9
+ break
10
+
11
  import os, cv2, time, math
12
  print("=> Loading libraries...")
13
  start = time.time()