Skip to content

Commit

Permalink
auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
statsmaths committed Feb 9, 2023
1 parent 73ec9aa commit 9af8383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dvt/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class AnnoDetect:
"""
def __init__(self, model_path=None):
if not model_path:
model_path = _download_file("dvt_detect.pt")
model_path = _download_file("dvt_detect.pt", "1.0.1")
self.model = torch.jit.load(model_path)
self.model.eval()

Expand Down
5 changes: 4 additions & 1 deletion dvt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ def save_image(image_path: str, img: np.ndarray) -> None:

def _download_file(
url: str,
basename="https://github.com/distant-viewing/dvt/releases/download/0.0.1/"
basename="https://github.com/distant-viewing/dvt/releases/download/": str,
version="0.0.1": str
) -> str:

basename = basename + version

if basename:
url = os.path.join(basename, url)

Expand Down

0 comments on commit 9af8383

Please sign in to comment.