Skip to content

Commit

Permalink
Merge pull request #1422 from Jackwaterveg/cli
Browse files Browse the repository at this point in the history
[ASR] cli: improve log of cli/asr/infer
  • Loading branch information
yt605155624 authored Feb 8, 2022
2 parents 89e69ee + f428ec4 commit a3ff7c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions paddlespeech/cli/asr/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ def _get_pretrained_path(self, tag: str) -> os.PathLike:
"""
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],
Expand Down

0 comments on commit a3ff7c0

Please sign in to comment.