Merge pull request #1422 from Jackwaterveg/cli

[ASR] cli: improve log of cli/asr/infer
pull/1429/head
TianYuan 3 years ago committed by GitHub
commit a3ff7c0df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -185,8 +185,9 @@ class ASRExecutor(BaseExecutor):
"""
Download and returns pretrained resources path of current task.
"""
assert tag in pretrained_models, 'Can not find pretrained resources of {}.'.format(
tag)
support_models = list(pretrained_models.keys())
assert tag in pretrained_models, 'The model "{}" you want to use has not been supported, please choose other models.\nThe support models includes:\n\t\t{}\n'.format(
tag, '\n\t\t'.join(support_models))
res_path = os.path.join(MODEL_HOME, tag)
decompressed_path = download_and_decompress(pretrained_models[tag],

Loading…
Cancel
Save