piperod commited on
Commit
eddda5a
·
1 Parent(s): f026190
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -8,7 +8,15 @@ from inference import inference_frame
8
  import os
9
 
10
 
 
 
11
 
 
 
 
 
 
 
12
 
13
  def analize_video(x):
14
  cap = cv2.VideoCapture(x)
 
8
  import os
9
 
10
 
11
+ if os.getenv('SYSTEM') == 'spaces':
12
+ import mim
13
 
14
+ mim.uninstall('mmcv-full', confirm_yes=True)
15
+ mim.install('mmcv-full==1.5.2', is_yes=True)
16
+
17
+ subprocess.call('pip uninstall -y opencv-python'.split())
18
+ subprocess.call('pip uninstall -y opencv-python-headless'.split())
19
+ subprocess.call('pip install opencv-python-headless==4.5.5.64'.split())
20
 
21
  def analize_video(x):
22
  cap = cv2.VideoCapture(x)