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

Add http support to model downloading#9

Open
vikranth22446 wants to merge 2 commits into
masterfrom
feature/http_download_support
Open

Add http support to model downloading#9
vikranth22446 wants to merge 2 commits into
masterfrom
feature/http_download_support

Conversation

@vikranth22446
Copy link
Copy Markdown
Contributor

@vikranth22446 vikranth22446 commented Jun 8, 2021

Another small pr to add http model downloading support

Comment thread src/file_download.py Outdated
Comment thread src/file_download.py Outdated
Comment thread src/file_download.py


def download_file(url, local_filename):
# local_filename = url.split('/')[-1]
Copy link
Copy Markdown
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.

Comment thread src/file_download.py
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
Copy Markdown
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