Spaces:
Runtime error
Runtime error
Update dalle/utils/utils.py
Browse files- dalle/utils/utils.py +2 -2
dalle/utils/utils.py
CHANGED
@@ -52,8 +52,8 @@ def download(url: str, root: str) -> str:
|
|
52 |
download_target = os.path.join(root, filename)
|
53 |
result_path = os.path.join(root, pathname)
|
54 |
|
55 |
-
if os.path.isfile(download_target) and (os.path.exists(result_path) and not os.path.isfile(result_path)):
|
56 |
-
|
57 |
|
58 |
with urllib.request.urlopen(url) as source, open(download_target, 'wb') as output:
|
59 |
with tqdm(total=int(source.info().get('Content-Length')), ncols=80, unit='iB', unit_scale=True,
|
|
|
52 |
download_target = os.path.join(root, filename)
|
53 |
result_path = os.path.join(root, pathname)
|
54 |
|
55 |
+
#if os.path.isfile(download_target) and (os.path.exists(result_path) and not os.path.isfile(result_path)):
|
56 |
+
# return result_path
|
57 |
|
58 |
with urllib.request.urlopen(url) as source, open(download_target, 'wb') as output:
|
59 |
with tqdm(total=int(source.info().get('Content-Length')), ncols=80, unit='iB', unit_scale=True,
|