Blane187 commited on
Commit
fafd9bc
1 Parent(s): bffe6ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -3,7 +3,24 @@ import gradio as gr
3
  import os
4
 
5
 
6
- os.system("python download_files.py")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  with gr.Blocks(title="RVC UI") as app:
9
  gr.Markdown("<center><h1> **RVC UI**")
 
3
  import os
4
 
5
 
6
+ import os
7
+
8
+ assets_folder = "./assets/"
9
+ if not os.path.exists(assets_folder):
10
+ os.makedirs(assets_folder)
11
+
12
+ files = {
13
+ "rmvpe/rmvpe.pt": "https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt",
14
+ "hubert/hubert_base.pt": "https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt"
15
+ }
16
+
17
+ for file, link in files.items():
18
+ file_path = os.path.join(assets_folder, file)
19
+ if not os.path.exists(file_path):
20
+ try:
21
+ os.system(f'wget {link} -O {file_path}')
22
+ except OSError as e:
23
+ print(f"Error downloading {file}: {e}")
24
 
25
  with gr.Blocks(title="RVC UI") as app:
26
  gr.Markdown("<center><h1> **RVC UI**")