glenn-jocher commited on
Commit
ffe9eb4
1 Parent(s): 23a7f29

remove if platform.system() == 'Darwin' checks

Browse files
Files changed (2) hide show
  1. utils/general.py +1 -4
  2. utils/google_utils.py +1 -4
utils/general.py CHANGED
@@ -146,10 +146,7 @@ def check_dataset(dict):
146
  print('Downloading %s ...' % s)
147
  if s.startswith('http') and s.endswith('.zip'): # URL
148
  f = Path(s).name # filename
149
- if platform.system() == 'Darwin': # avoid MacOS python requests certificate error
150
- os.system('curl -L %s -o %s' % (s, f))
151
- else:
152
- torch.hub.download_url_to_file(s, f)
153
  r = os.system('unzip -q %s -d ../ && rm %s' % (f, f)) # unzip
154
  else: # bash script
155
  r = os.system(s)
 
146
  print('Downloading %s ...' % s)
147
  if s.startswith('http') and s.endswith('.zip'): # URL
148
  f = Path(s).name # filename
149
+ torch.hub.download_url_to_file(s, f)
 
 
 
150
  r = os.system('unzip -q %s -d ../ && rm %s' % (f, f)) # unzip
151
  else: # bash script
152
  r = os.system(s)
utils/google_utils.py CHANGED
@@ -31,10 +31,7 @@ def attempt_download(weights):
31
  try: # GitHub
32
  url = 'https://github.com/ultralytics/yolov5/releases/download/v3.0/' + file
33
  print('Downloading %s to %s...' % (url, weights))
34
- if platform.system() == 'Darwin': # avoid MacOS python requests certificate error
35
- r = os.system('curl -L %s -o %s' % (url, weights))
36
- else:
37
- torch.hub.download_url_to_file(url, weights)
38
  assert os.path.exists(weights) and os.path.getsize(weights) > 1E6 # check
39
  except Exception as e: # GCP
40
  print('Download error: %s' % e)
 
31
  try: # GitHub
32
  url = 'https://github.com/ultralytics/yolov5/releases/download/v3.0/' + file
33
  print('Downloading %s to %s...' % (url, weights))
34
+ torch.hub.download_url_to_file(url, weights)
 
 
 
35
  assert os.path.exists(weights) and os.path.getsize(weights) > 1E6 # check
36
  except Exception as e: # GCP
37
  print('Download error: %s' % e)