Spaces:
Runtime error
Runtime error
Daryl Fung
commited on
Commit
•
c50eba6
1
Parent(s):
7506f3d
updated app.py
Browse files
app.py
CHANGED
@@ -136,6 +136,7 @@ weight_root = './assets/weights'
|
|
136 |
weight_uvr5_root = './assets/uvr5_weights'
|
137 |
index_root = './assets/indices'
|
138 |
outside_index_root = './assets'
|
|
|
139 |
|
140 |
names = []
|
141 |
for name in os.listdir(weight_root):
|
@@ -1214,7 +1215,7 @@ with gr.Blocks(title="RVC WebUI") as app:
|
|
1214 |
with gr.Row():
|
1215 |
trainset_dir4 = gr.Textbox(
|
1216 |
label=i18n("输入训练文件夹路径"),
|
1217 |
-
value='audios'
|
1218 |
# value=i18n("E:\\语音音频+标注\\米津玄师\\src"),
|
1219 |
)
|
1220 |
spk_id5 = gr.Slider(
|
@@ -1599,12 +1600,10 @@ with gr.Blocks(title="RVC WebUI") as app:
|
|
1599 |
)
|
1600 |
|
1601 |
with gr.TabItem("File Explorer (upload)"):
|
1602 |
-
gr.Markdown('### `FileExplorer` to `FileExplorer` -- `file_count="single"`')
|
1603 |
-
upload_submit_btn = gr.Button("Select")
|
1604 |
with gr.Row():
|
1605 |
def upload_file(filepath):
|
1606 |
filename = os.path.basename(filepath)
|
1607 |
-
shutil.copy(name, os.path.join('audios', filename))
|
1608 |
upload_button = gr.UploadButton(label=f"Upload", visible=True, file_count='single')
|
1609 |
upload_button.upload(upload_file, upload_button, None)
|
1610 |
|
|
|
136 |
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 |
with gr.Row():
|
1216 |
trainset_dir4 = gr.Textbox(
|
1217 |
label=i18n("输入训练文件夹路径"),
|
1218 |
+
value=os.path.join(project_dir, 'audios')
|
1219 |
# value=i18n("E:\\语音音频+标注\\米津玄师\\src"),
|
1220 |
)
|
1221 |
spk_id5 = gr.Slider(
|
|
|
1600 |
)
|
1601 |
|
1602 |
with gr.TabItem("File Explorer (upload)"):
|
|
|
|
|
1603 |
with gr.Row():
|
1604 |
def upload_file(filepath):
|
1605 |
filename = os.path.basename(filepath)
|
1606 |
+
shutil.copy(name, os.path.join(project_dir, 'audios', filename))
|
1607 |
upload_button = gr.UploadButton(label=f"Upload", visible=True, file_count='single')
|
1608 |
upload_button.upload(upload_file, upload_button, None)
|
1609 |
|