Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from googledriver import download
- URL = 'https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'
- download(URL, './model/tf_gpt2_model')
- from googledriver import download
- URL = 'https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'
- cached_path = download(URL, None, 'tf_model')
- Installation
- pip install googledriver
- Features
- 1. File Download
- Download to specific path
- from googledriver import download
- URL = 'https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'
- download(URL, './model/tf_gpt2_model')
- Download to cached folder
- To download a cached file (or directory) from a URL and return its path, you can use the following method.
- from googledriver import download
- URL = 'https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'
- cached_path = download(URL, None, 'tf_model')
- #=============================================================#
- 2. Folder Download
- from googledriver import download_folder
- URL = 'https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'
- download_folder(URL)
- from googledriver import download_folder
- URL = 'https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'
- save_folder = './any/path/to/save/'
- download_folder(URL, save_folder)
- from googledriver import download_folder
- URL = 'https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'
- download_folder(URL, cached=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement