未验证 提交 90ef69ac 编写于 作者: 走神的阿圆's avatar 走神的阿圆 提交者: GitHub

Update cache when downloading models. (#690)

上级 0b14d336
......@@ -29,6 +29,7 @@ import tarfile
from paddlehub.common import utils
from paddlehub.common.logger import logger
from paddlehub.common import tmp_dir
from paddlehub.common.hub_server import CacheUpdater
import paddlehub as hub
__all__ = ['Downloader', 'progress']
......@@ -197,7 +198,7 @@ def download(name,
if not search_result:
raise ResourceNotFoundError(name, version)
CacheUpdater("hub_download", name, version).start()
url = search_result['url']
with tmp_dir() as _dir:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册