mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Fixed reported header affecting resuming download
This commit is contained in:
parent
92c7068daf
commit
b99bea3c69
@ -34,7 +34,7 @@ def get_file(url, output_folder):
|
|||||||
output_path = output_folder / filename
|
output_path = output_folder / filename
|
||||||
if output_path.exists() and not args.clean:
|
if output_path.exists() and not args.clean:
|
||||||
# Check if the file has already been downloaded completely
|
# Check if the file has already been downloaded completely
|
||||||
r = requests.head(url)
|
r = requests.get(url, stream=True)
|
||||||
total_size = int(r.headers.get('content-length', 0))
|
total_size = int(r.headers.get('content-length', 0))
|
||||||
if output_path.stat().st_size >= total_size:
|
if output_path.stat().st_size >= total_size:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user