Hubconf.py bug fix (#3007)
This commit is contained in:
1 parent
7c89c829e3
commit
31ee54c28c
2 files changed
+2
-1
No files matched your search
@@ -21,6 +21,7 @@ def attempt_download(file, repo='ultralytics/yolov5'):
|
||||
file = Path(str(file).strip().replace("'", ''))
|
||||
|
||||
if not file.exists():
|
||||
file.parent.mkdir(parents=True, exist_ok=True) # make parent dir (if required)
|
||||
try:
|
||||
response = requests.get(f'https://api.github.com/repos/{repo}/releases/latest').json() # github api
|
||||
assets = [x['name'] for x in response['assets']] # release assets, i.e. ['yolov5s.pt', 'yolov5m.pt', ...]
|
||||
|
||||
Reference in new issue
Block a user