mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 15:57:04 +00:00
accurate loading bar for resume download
This commit is contained in:
@@ -90,7 +90,7 @@ def download_file(download_url, models_home, location, file_size):
|
||||
response = requests.get(download_url, headers=header, stream=True)
|
||||
response.raise_for_status()
|
||||
|
||||
total_size = int(response.headers.get('content-length', 0))
|
||||
total_size = int(response.headers.get('content-length', 0)) + first_byte
|
||||
|
||||
with open(local_filename, 'ab' if first_byte else 'wb') as file, tqdm(
|
||||
total=total_size,
|
||||
|
||||
Reference in New Issue
Block a user