Skip to content

Commit

Permalink
make model_folder invariant
Browse files Browse the repository at this point in the history
Getkablue committed Sep 23, 2024
1 parent 81eb7d0 commit 731dc5d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse
import json
import os
from pathlib import Path
import shutil
import warnings

@@ -182,6 +183,7 @@ def main() -> None:
print(f"Renaming dic is saved to {datalist_file}")

model_folder = os.path.join(
Path(__file__).parent,
"nnunet_results",
"Dataset%s_Task%s_dlicv/nnUNetTrainer__nnUNetPlans__3d_fullres/"
% (args.d, args.d),
@@ -193,8 +195,8 @@ def main() -> None:
print("DLICV model not found, downloading...")

from huggingface_hub import snapshot_download

snapshot_download(repo_id="nichart/DLICV", local_dir=".")
local_src = Path(__file__).parent
snapshot_download(repo_id="nichart/DLICV", local_dir=local_src)
print("DLICV model has been successfully downloaded!")
else:
print("Loading the model...")

0 comments on commit 731dc5d

Please sign in to comment.