Spaces:
Runtime error
Runtime error
Commit
·
50a3b36
1
Parent(s):
2bdad0b
Fix file path in model renaming process to use remote directory instead of local directory.
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ from src.model import LSM_MASt3R
|
|
| 22 |
|
| 23 |
# Download the model checkpoint from Hugging Face Hub
|
| 24 |
repo_id = "Journey9ni/LSM"
|
| 25 |
-
remote_dir = "checkpoints/pretrained_models
|
| 26 |
local_dir = "checkpoints/pretrained_model"
|
| 27 |
model_path_map = {
|
| 28 |
"MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth": "MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth",
|
|
@@ -35,7 +35,7 @@ snapshot_download(repo_id=repo_id)
|
|
| 35 |
|
| 36 |
# rename the files
|
| 37 |
for remote_name, local_name in model_path_map.items():
|
| 38 |
-
os.rename(os.path.join(
|
| 39 |
|
| 40 |
# load the model
|
| 41 |
model_path = "checkpoints/pretrained_model/checkpoint-40.pth"
|
|
|
|
| 22 |
|
| 23 |
# Download the model checkpoint from Hugging Face Hub
|
| 24 |
repo_id = "Journey9ni/LSM"
|
| 25 |
+
remote_dir = "checkpoints/pretrained_models"
|
| 26 |
local_dir = "checkpoints/pretrained_model"
|
| 27 |
model_path_map = {
|
| 28 |
"MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth": "MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth",
|
|
|
|
| 35 |
|
| 36 |
# rename the files
|
| 37 |
for remote_name, local_name in model_path_map.items():
|
| 38 |
+
os.rename(os.path.join(remote_dir, remote_name), os.path.join(local_dir, local_name))
|
| 39 |
|
| 40 |
# load the model
|
| 41 |
model_path = "checkpoints/pretrained_model/checkpoint-40.pth"
|