Spaces:
Runtime error
Runtime error
Renamed variable
Browse files
app.py
CHANGED
@@ -12,12 +12,12 @@ def load_model(current_path):
|
|
12 |
data_path = os.path.join(current_path, 'data')
|
13 |
if not os.path.isdir(data_path):
|
14 |
os.mkdir(data_path)
|
15 |
-
|
16 |
'config.yaml': 'https://raw.githubusercontent.com/facebookresearch/detectron2/main/projects/DensePose/configs/densepose_rcnn_R_50_FPN_WC1M_s1x.yaml',
|
17 |
'weights.pkl': 'https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_WC1M_s1x/217144516/model_final_48a9d9.pkl',
|
18 |
'Base-DensePose-RCNN-FPN.yaml': 'https://raw.githubusercontent.com/facebookresearch/detectron2/main/projects/DensePose/configs/Base-DensePose-RCNN-FPN.yaml'
|
19 |
}
|
20 |
-
for filename, url in
|
21 |
wget.download(url, os.path.join(data_path, filename))
|
22 |
|
23 |
current_path = os.getcwd()
|
|
|
12 |
data_path = os.path.join(current_path, 'data')
|
13 |
if not os.path.isdir(data_path):
|
14 |
os.mkdir(data_path)
|
15 |
+
loader_dict = {
|
16 |
'config.yaml': 'https://raw.githubusercontent.com/facebookresearch/detectron2/main/projects/DensePose/configs/densepose_rcnn_R_50_FPN_WC1M_s1x.yaml',
|
17 |
'weights.pkl': 'https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_WC1M_s1x/217144516/model_final_48a9d9.pkl',
|
18 |
'Base-DensePose-RCNN-FPN.yaml': 'https://raw.githubusercontent.com/facebookresearch/detectron2/main/projects/DensePose/configs/Base-DensePose-RCNN-FPN.yaml'
|
19 |
}
|
20 |
+
for filename, url in loader_dict.items():
|
21 |
wget.download(url, os.path.join(data_path, filename))
|
22 |
|
23 |
current_path = os.getcwd()
|