Spaces:
Sleeping
Sleeping
Update weights.py
Browse files- weights.py +4 -5
weights.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import os
|
2 |
import gdown
|
3 |
-
import torch
|
4 |
from pathlib import Path
|
5 |
|
6 |
def download_weights():
|
@@ -8,10 +7,10 @@ def download_weights():
|
|
8 |
Path("weights/icon_detect").mkdir(parents=True, exist_ok=True)
|
9 |
Path("weights/icon_caption_florence").mkdir(parents=True, exist_ok=True)
|
10 |
|
11 |
-
#
|
12 |
files_to_download = {
|
13 |
-
"
|
14 |
-
"
|
15 |
}
|
16 |
|
17 |
for file_id, output_path in files_to_download.items():
|
@@ -24,4 +23,4 @@ def download_weights():
|
|
24 |
print(f"File {output_path} already exists, skipping download")
|
25 |
|
26 |
if __name__ == "__main__":
|
27 |
-
download_weights()
|
|
|
1 |
import os
|
2 |
import gdown
|
|
|
3 |
from pathlib import Path
|
4 |
|
5 |
def download_weights():
|
|
|
7 |
Path("weights/icon_detect").mkdir(parents=True, exist_ok=True)
|
8 |
Path("weights/icon_caption_florence").mkdir(parents=True, exist_ok=True)
|
9 |
|
10 |
+
# Correct file mapping with Drive file IDs and their corresponding local paths
|
11 |
files_to_download = {
|
12 |
+
"1hUCqZ3X8mcM-KcwWFjcsFg7PA0hUvE3k": "weights/icon_caption_florence/model.safetensors",
|
13 |
+
"1p-Y7rd0FfjNnv_jewCi7ZjXH3T-qtyAa": "weights/icon_detect/best.pt"
|
14 |
}
|
15 |
|
16 |
for file_id, output_path in files_to_download.items():
|
|
|
23 |
print(f"File {output_path} already exists, skipping download")
|
24 |
|
25 |
if __name__ == "__main__":
|
26 |
+
download_weights()
|