Unverified 提交 3e7c59ad authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Fix rename `utils.google_utils` to `utils.downloads` (#4393)

上级 a4e45530
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# └── ... # └── ...
python - <<EOF python - <<EOF
from utils.google_utils import attempt_download from utils.downloads import attempt_download
for x in ['s', 'm', 'l', 'x']: for x in ['s', 'm', 'l', 'x']:
attempt_download(f'yolov5{x}.pt') attempt_download(f'yolov5{x}.pt')
......
...@@ -36,7 +36,7 @@ def safe_download(file, url, url2=None, min_bytes=1E0, error_msg=''): ...@@ -36,7 +36,7 @@ def safe_download(file, url, url2=None, min_bytes=1E0, error_msg=''):
print('') print('')
def attempt_download(file, repo='ultralytics/yolov5'): # from utils.google_utils import *; attempt_download() def attempt_download(file, repo='ultralytics/yolov5'): # from utils.downloads import *; attempt_download()
# Attempt file download if does not exist # Attempt file download if does not exist
file = Path(str(file).strip().replace("'", '')) file = Path(str(file).strip().replace("'", ''))
...@@ -74,7 +74,7 @@ def attempt_download(file, repo='ultralytics/yolov5'): # from utils.google_util ...@@ -74,7 +74,7 @@ def attempt_download(file, repo='ultralytics/yolov5'): # from utils.google_util
def gdrive_download(id='16TiPfZj7htmTyhntwcZyEEAejOUxuT6m', file='tmp.zip'): def gdrive_download(id='16TiPfZj7htmTyhntwcZyEEAejOUxuT6m', file='tmp.zip'):
# Downloads a file from Google Drive. from yolov5.utils.google_utils import *; gdrive_download() # Downloads a file from Google Drive. from yolov5.utils.downloads import *; gdrive_download()
t = time.time() t = time.time()
file = Path(file) file = Path(file)
cookie = Path('cookie') # gdrive cookie cookie = Path('cookie') # gdrive cookie
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论