remove if platform.system() == 'Darwin' checks
This commit is contained in:
1 parent
23a7f29e2d
commit
ffe9eb4238
2 files changed
+2
-8
No files matched your search
@@ -31,10 +31,7 @@ def attempt_download(weights):
|
||||
try: # GitHub
|
||||
url = 'https://github.com/ultralytics/yolov5/releases/download/v3.0/' + file
|
||||
print('Downloading %s to %s...' % (url, weights))
|
||||
if platform.system() == 'Darwin': # avoid MacOS python requests certificate error
|
||||
r = os.system('curl -L %s -o %s' % (url, weights))
|
||||
else:
|
||||
torch.hub.download_url_to_file(url, weights)
|
||||
torch.hub.download_url_to_file(url, weights)
|
||||
assert os.path.exists(weights) and os.path.getsize(weights) > 1E6 # check
|
||||
except Exception as e: # GCP
|
||||
print('Download error: %s' % e)
|
||||
|
||||
Reference in new issue
Block a user