Spaces:
Runtime error
Runtime error
Daryl Fung
commited on
Commit
•
6465a88
1
Parent(s):
db873ec
updated app.py
Browse files
app.py
CHANGED
@@ -137,6 +137,8 @@ weight_uvr5_root = './assets/uvr5_weights'
|
|
137 |
index_root = './assets/indices'
|
138 |
outside_index_root = './assets'
|
139 |
project_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
140 |
|
141 |
names = []
|
142 |
for name in os.listdir(weight_root):
|
@@ -1215,7 +1217,7 @@ with gr.Blocks(title="RVC WebUI") as app:
|
|
1215 |
with gr.Row():
|
1216 |
trainset_dir4 = gr.Textbox(
|
1217 |
label=i18n("输入训练文件夹路径"),
|
1218 |
-
value=
|
1219 |
# value=i18n("E:\\语音音频+标注\\米津玄师\\src"),
|
1220 |
)
|
1221 |
spk_id5 = gr.Slider(
|
@@ -1603,7 +1605,7 @@ with gr.Blocks(title="RVC WebUI") as app:
|
|
1603 |
with gr.Row():
|
1604 |
def upload_file(filepath):
|
1605 |
filename = os.path.basename(filepath)
|
1606 |
-
shutil.copy(name, os.path.join(
|
1607 |
upload_button = gr.UploadButton(label=f"Upload", visible=True, file_count='single')
|
1608 |
upload_button.upload(upload_file, upload_button, None)
|
1609 |
|
|
|
137 |
index_root = './assets/indices'
|
138 |
outside_index_root = './assets'
|
139 |
project_dir = os.path.dirname(os.path.abspath(__file__))
|
140 |
+
audio_dir = os.path.join(project_dir, 'audios')
|
141 |
+
os.makedirs(audio_dir, exist_ok=True)
|
142 |
|
143 |
names = []
|
144 |
for name in os.listdir(weight_root):
|
|
|
1217 |
with gr.Row():
|
1218 |
trainset_dir4 = gr.Textbox(
|
1219 |
label=i18n("输入训练文件夹路径"),
|
1220 |
+
value=audio_dir
|
1221 |
# value=i18n("E:\\语音音频+标注\\米津玄师\\src"),
|
1222 |
)
|
1223 |
spk_id5 = gr.Slider(
|
|
|
1605 |
with gr.Row():
|
1606 |
def upload_file(filepath):
|
1607 |
filename = os.path.basename(filepath)
|
1608 |
+
shutil.copy(name, os.path.join(audio_dir, filename))
|
1609 |
upload_button = gr.UploadButton(label=f"Upload", visible=True, file_count='single')
|
1610 |
upload_button.upload(upload_file, upload_button, None)
|
1611 |
|