Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Add http support to model downloading #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vikranth22446
Copy link
Contributor

@vikranth22446 vikranth22446 commented Jun 8, 2021

Another small pr to add http model downloading support

src/file_download.py Outdated Show resolved Hide resolved
src/file_download.py Outdated Show resolved Hide resolved

def extract_id_from_google_drive_share_link(drive_link):
return drive_link


def download_file(url, local_filename):
# local_filename = url.split('/')[-1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be deleted, I think.

r.raise_for_status()
with open(local_filename, 'wb') as f:
for chunk in r.iter_content(chunk_size=8192):
# If you have chunk encoded response uncomment if
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "chunk encoded response" mean?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants