Update demo.py
Browse files
demo.py
CHANGED
@@ -3,7 +3,6 @@ import shutil, glob
|
|
3 |
from easyfuncs import download_from_url, CachedModels
|
4 |
os.makedirs("dataset",exist_ok=True)
|
5 |
model_library = CachedModels()
|
6 |
-
from infer.modules.vc.modules import VC
|
7 |
|
8 |
with gr.Blocks(title="easygui v2",theme="Blane187/fuchsia") as app:
|
9 |
with gr.Row():
|
@@ -198,8 +197,7 @@ with gr.Blocks(title="easygui v2",theme="Blane187/fuchsia") as app:
|
|
198 |
label="Sampling Rate",
|
199 |
choices=["40k", "32k"],
|
200 |
value="32k",
|
201 |
-
interactive=True
|
202 |
-
visible=False
|
203 |
)
|
204 |
if_f0_3 = gr.Radio(
|
205 |
label="Will your model be used for singing? If not, you can ignore this.",
|
@@ -340,18 +338,14 @@ with gr.Blocks(title="easygui v2",theme="Blane187/fuchsia") as app:
|
|
340 |
)
|
341 |
with gr.Accordion(label="Change pretrains", open=False):
|
342 |
pretrained = lambda sr, letter: [os.path.abspath(os.path.join('assets/pretrained_v2', file)) for file in os.listdir('assets/pretrained_v2') if file.endswith('.pth') and sr in file and letter in file]
|
343 |
-
pretrained_G14 = gr.
|
344 |
-
label="
|
345 |
-
|
346 |
-
choices = pretrained(sr2.value, 'G'),
|
347 |
-
value=pretrained(sr2.value, 'G')[0] if len(pretrained(sr2.value, 'G')) > 0 else '',
|
348 |
interactive=True,
|
349 |
visible=True
|
350 |
)
|
351 |
-
pretrained_D15 = gr.
|
352 |
-
label="pretrained D",
|
353 |
-
choices = pretrained(sr2.value, 'D'),
|
354 |
-
value= pretrained(sr2.value, 'D')[0] if len(pretrained(sr2.value, 'G')) > 0 else '',
|
355 |
visible=True,
|
356 |
interactive=True
|
357 |
)
|
|
|
3 |
from easyfuncs import download_from_url, CachedModels
|
4 |
os.makedirs("dataset",exist_ok=True)
|
5 |
model_library = CachedModels()
|
|
|
6 |
|
7 |
with gr.Blocks(title="easygui v2",theme="Blane187/fuchsia") as app:
|
8 |
with gr.Row():
|
|
|
197 |
label="Sampling Rate",
|
198 |
choices=["40k", "32k"],
|
199 |
value="32k",
|
200 |
+
interactive=True
|
|
|
201 |
)
|
202 |
if_f0_3 = gr.Radio(
|
203 |
label="Will your model be used for singing? If not, you can ignore this.",
|
|
|
338 |
)
|
339 |
with gr.Accordion(label="Change pretrains", open=False):
|
340 |
pretrained = lambda sr, letter: [os.path.abspath(os.path.join('assets/pretrained_v2', file)) for file in os.listdir('assets/pretrained_v2') if file.endswith('.pth') and sr in file and letter in file]
|
341 |
+
pretrained_G14 = gr.Textbox(
|
342 |
+
label="custom Pretrained G path",
|
343 |
+
|
|
|
|
|
344 |
interactive=True,
|
345 |
visible=True
|
346 |
)
|
347 |
+
pretrained_D15 = gr.Textbox(
|
348 |
+
label="custom pretrained D path",
|
|
|
|
|
349 |
visible=True,
|
350 |
interactive=True
|
351 |
)
|