mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-14 14:13:38 +00:00
less magic number
This commit is contained in:
parent
4dff67cee5
commit
b12e0e98c7
@ -128,7 +128,7 @@ class GPT4All():
|
|||||||
# TODO: Find good way of safely removing file that got interrupted.
|
# TODO: Find good way of safely removing file that got interrupted.
|
||||||
response = requests.get(download_url, stream=True)
|
response = requests.get(download_url, stream=True)
|
||||||
total_size_in_bytes = int(response.headers.get("content-length", 0))
|
total_size_in_bytes = int(response.headers.get("content-length", 0))
|
||||||
block_size = 1048576 # 1 MB
|
block_size = 2 ** 20 # 1 MB
|
||||||
progress_bar = tqdm(total=total_size_in_bytes, unit="iB", unit_scale=True)
|
progress_bar = tqdm(total=total_size_in_bytes, unit="iB", unit_scale=True)
|
||||||
with open(download_path, "wb") as file:
|
with open(download_path, "wb") as file:
|
||||||
for data in response.iter_content(block_size):
|
for data in response.iter_content(block_size):
|
||||||
|
Loading…
Reference in New Issue
Block a user