mrfakename commited on
Commit
dc26cc5
·
verified ·
1 Parent(s): dc26287

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,7 +13,7 @@ from typing import Optional, Tuple
13
  import torch
14
  import numpy as np
15
  import torchaudio
16
- from cached_path import cached_path
17
 
18
  # Add MuCodec to path
19
  sys.path.insert(0, "./MuCodec")
@@ -52,7 +52,7 @@ print("Loading MuCodec decoder...")
52
  mucodec_dir = "./MuCodec"
53
  ckpt_path = os.path.join(mucodec_dir, "ckpt/mucodec.pt")
54
  #audioldm_path = os.path.join(mucodec_dir, "tools/audioldm_48k.pth")
55
- audioldm_path = str(cached_path("hf://haoheliu/audioldm_48k/audioldm_48k.pth"))
56
  config_path = os.path.join(mucodec_dir, "configs/models/transformer2D.json")
57
 
58
  # Load VAE and STFT
 
13
  import torch
14
  import numpy as np
15
  import torchaudio
16
+ from huggingface_hub import snapshot_download
17
 
18
  # Add MuCodec to path
19
  sys.path.insert(0, "./MuCodec")
 
52
  mucodec_dir = "./MuCodec"
53
  ckpt_path = os.path.join(mucodec_dir, "ckpt/mucodec.pt")
54
  #audioldm_path = os.path.join(mucodec_dir, "tools/audioldm_48k.pth")
55
+ audioldm_path = os.path.join(snapshot_download("haoheliu/audioldm_48k", "audioldm_48k.pth"))
56
  config_path = os.path.join(mucodec_dir, "configs/models/transformer2D.json")
57
 
58
  # Load VAE and STFT