提交 3b9847b4 编写于 作者: S Steffy-zxf 提交者: wuzewu

Update the command download (#14)

* Update the command download so as to show search tips when module/model can't find
上级 5a9d3941
...@@ -68,9 +68,10 @@ class DownloadCommand(BaseCommand): ...@@ -68,9 +68,10 @@ class DownloadCommand(BaseCommand):
url = search_result.get('url', None) url = search_result.get('url', None)
except_md5_value = search_result.get('md5', None) except_md5_value = search_result.get('md5', None)
if not url: if not url:
tips = "Can't found model/module %s" % mod_name tips = "PaddleHub can't find model/module named %s" % mod_name
if model_version: if mod_version:
tips += " with version %s" % mod_version tips += " with version %s" % mod_version
tips += ". Please use the 'hub search' command to find the correct model/module name."
print(tips) print(tips)
return True return True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册