Spaces:
Runtime error
Runtime error
NassimeBejaia
commited on
Commit
•
fb370ac
1
Parent(s):
6699f11
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,7 @@ import cv2
|
|
10 |
import itertools
|
11 |
import sys
|
12 |
|
13 |
-
|
14 |
-
sys.path.insert(0, 'home/user/app/test_detection/yolov5')
|
15 |
-
|
16 |
-
os.system("sys.path.insert(0, 'home/user/app/test_detection/yolov5/models')")
|
17 |
-
sys.path.insert(0, 'home/user/app/test_detection/yolov5/models')
|
18 |
|
19 |
def load_model():
|
20 |
wpath = 'test_detection/yolov5/weights/crowdhuman_yolov5m.pt'
|
@@ -127,6 +123,15 @@ if __name__ == '__main__':
|
|
127 |
sys.path.insert(0, './app/test_detection/yolov5')
|
128 |
sys.path.insert(0, '/app/test_detection/yolov5')
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
|
132 |
st.write(os.listdir('test_detection/yolov5/'))
|
|
|
10 |
import itertools
|
11 |
import sys
|
12 |
|
13 |
+
|
|
|
|
|
|
|
|
|
14 |
|
15 |
def load_model():
|
16 |
wpath = 'test_detection/yolov5/weights/crowdhuman_yolov5m.pt'
|
|
|
123 |
sys.path.insert(0, './app/test_detection/yolov5')
|
124 |
sys.path.insert(0, '/app/test_detection/yolov5')
|
125 |
|
126 |
+
os.environ['PYTHONPATH'] += "home/user/app/test_detection/yolov5"
|
127 |
+
os.environ['PYTHONPATH'] += "test_detection/yolov5/models"
|
128 |
+
|
129 |
+
os.system("sys.path.insert(0, 'home/user/app/test_detection/yolov5')")
|
130 |
+
sys.path.insert(0, 'home/user/app/test_detection/yolov5')
|
131 |
+
|
132 |
+
os.system("sys.path.insert(0, 'home/user/app/test_detection/yolov5/models')")
|
133 |
+
sys.path.insert(0, 'home/user/app/test_detection/yolov5/models')
|
134 |
+
|
135 |
|
136 |
|
137 |
st.write(os.listdir('test_detection/yolov5/'))
|