From 8053dc014b9e5b2130dd69214a5298f4f2087e2b Mon Sep 17 00:00:00 2001 From: Konstantin Gukov Date: Thu, 25 May 2023 17:32:26 +0200 Subject: [PATCH] less magic number --- gpt4all-bindings/python/gpt4all/gpt4all.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpt4all-bindings/python/gpt4all/gpt4all.py b/gpt4all-bindings/python/gpt4all/gpt4all.py index 6ea0f2a7..73570f18 100644 --- a/gpt4all-bindings/python/gpt4all/gpt4all.py +++ b/gpt4all-bindings/python/gpt4all/gpt4all.py @@ -128,7 +128,7 @@ class GPT4All(): # TODO: Find good way of safely removing file that got interrupted. response = requests.get(download_url, stream=True) 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) with open(download_path, "wb") as file: for data in response.iter_content(block_size):