Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,24 @@ import gradio as gr
|
|
| 3 |
import os
|
| 4 |
|
| 5 |
|
| 6 |
-
os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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**")
|