From b5fa55d8034c0bf4058f04a4231b3996df64e539 Mon Sep 17 00:00:00 2001 From: 46319943 <495384481@qq.com> Date: Thu, 20 Apr 2023 09:40:40 +0800 Subject: [PATCH] Fix parameter. --- paddlespeech/cli/download.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddlespeech/cli/download.py b/paddlespeech/cli/download.py index 958560e72..e77a05d2e 100644 --- a/paddlespeech/cli/download.py +++ b/paddlespeech/cli/download.py @@ -133,8 +133,8 @@ def _get_download(url, fullname): total_size = req.headers.get('content-length') with open(tmp_fullname, 'wb') as f: if total_size: - with tqdm(total=(int(total_size))) as pbar: - for chunk in req.iter_content(chunk_size=1024, unit='B', unit_scale=True): + with tqdm(total=(int(total_size)), unit='B', unit_scale=True) as pbar: + for chunk in req.iter_content(chunk_size=1024): f.write(chunk) pbar.update(len(chunk)) else: