Skip to content

Commit

Permalink
fix(utils): replace dict | dict with dict.update
Browse files Browse the repository at this point in the history
  • Loading branch information
34j committed Apr 4, 2023
1 parent dbcfb31 commit e3254a5
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/so_vits_svc_fork/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,14 @@ def download_file(
temppath.unlink(missing_ok=True)
resp = requests.get(url, stream=True)
total = int(resp.headers.get("content-length", 0))
kwargs = (
dict(
total=total,
unit="iB",
unit_scale=True,
unit_divisor=1024,
desc=f"Downloading {filepath.name}",
)
| tqdm_kwargs
kwargs = dict(
total=total,
unit="iB",
unit_scale=True,
unit_divisor=1024,
desc=f"Downloading {filepath.name}",
)
kwargs.update(tqdm_kwargs)
with temppath.open("wb") as f, tqdm_cls(**kwargs) as pbar:
for data in resp.iter_content(chunk_size=chunk_size):
size = f.write(data)
Expand Down

0 comments on commit e3254a5

Please sign in to comment.