Blane187 commited on
Commit
615218c
1 Parent(s): 72c1c6d

Create download_files.py

Browse files
Files changed (1) hide show
  1. download_files.py +15 -0
download_files.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess, os
2
+ assets_folder = "./assets/"
3
+ if not os.path.exists(assets_folder):
4
+ os.makedirs(assets_folder)
5
+ files = {
6
+ "rmvpe/rmvpe.pt":"https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt",
7
+ "hubert/hubert_base.pt":"https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt"
8
+ }
9
+ for file, link in files.items():
10
+ file_path = os.path.join(assets_folder, file)
11
+ if not os.path.exists(file_path):
12
+ try:
13
+ subprocess.run(['wget', link, '-O', file_path], check=True)
14
+ except subprocess.CalledProcessError as e:
15
+ print(f"Error downloading {file}: {e}")