Skip to content

Commit

Permalink
fix: ✨ handle non fork gdown in model dll
Browse files Browse the repository at this point in the history
Also fix a dumb mistake from earlier tests..
  • Loading branch information
melMass committed Jul 7, 2023
1 parent 1e28606 commit 95797e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/download_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"download_url": [
"https://drive.google.com/drive/folders/131_--QrieM4aQbbLWrUtbO2cGbX8-war"
],
"destination": "FILMOS",
"destination": "FILM",
},
}

Expand All @@ -65,7 +65,11 @@ def download_model(download_url, destination):
if "drive.google.com" in download_url:
if "/folders/" in download_url:
# download folder
gdown.download_folder(download_url, output=destination, resume=True)
try:
gdown.download_folder(download_url, output=destination, resume=True)
except TypeError:
gdown.download_folder(download_url, output=destination)

return
# download from google drive
gdown.download(download_url, destination, quiet=False, resume=True)
Expand Down

0 comments on commit 95797e8

Please sign in to comment.