Skip to content

Commit

Permalink
make model dir if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
BioWilko committed Dec 4, 2024
1 parent 1786079 commit 075e397
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions artic/get_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import tarfile
import sys
from artic.utils import clair3_manifest
from clint.textui import colored


def download_file(url: str, local_path: Path):
Expand All @@ -18,6 +19,8 @@ def get_model(model_dir: Path, model_fname: str, model_url: str):

model_path = Path(model_dir, model_fname)

os.makedirs(model_dir, exist_ok=True)

download_file(model_url, model_path)

with tarfile.open(model_path, "r") as tar:
Expand Down

0 comments on commit 075e397

Please sign in to comment.