Ultralytics Code Refactor https://ultralytics.com/actions (#13152)
Refactor code for speed and clarity
This commit is contained in:
1 parent
05e59bdec1
commit
b9019671f4
13 files changed
+29
-5
No files matched your search
+1
-1
@@ -92,7 +92,7 @@ def attempt_download(file, repo="ultralytics/yolov5", release="v7.0"):
|
||||
from utils.general import LOGGER
|
||||
|
||||
def github_assets(repository, version="latest"):
|
||||
# Return GitHub repo tag (i.e. 'v7.0') and assets (i.e. ['yolov5s.pt', 'yolov5m.pt', ...])
|
||||
"""Fetches GitHub repository release tag and asset names using the GitHub API."""
|
||||
if version != "latest":
|
||||
version = f"tags/{version}" # i.e. tags/v7.0
|
||||
response = requests.get(f"https://api.github.com/repos/{repository}/releases/{version}").json() # github api
|
||||
|
||||
Reference in new issue
Block a user