-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move model from Google Drive to Dropbox
- Loading branch information
Showing
3 changed files
with
47 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import shutil | ||
|
||
import gdown | ||
import dropbox | ||
|
||
from common.config import conf | ||
from common import config | ||
|
||
if __name__ == "__main__": | ||
url = f"https://drive.google.com/uc?id={conf.model_zip_id}" | ||
client = dropbox.Dropbox(config.dropbox_token) | ||
destination = "model.zip" | ||
gdown.download(url, destination, quiet=False) | ||
shutil.unpack_archive("model.zip") | ||
_, response = client.files_download("/model.zip") | ||
with open(destination, "wb") as f: | ||
f.write(response.content) | ||
shutil.unpack_archive(destination) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters