@@ -1394,7 +1394,9 @@ def export_onnx(ModelPath, ExportedPath):
1394
1394
visible = False ,
1395
1395
interactive = True ,
1396
1396
)
1397
- clean_button .click (fn = clean , inputs = [], outputs = [sid0 ], api_name = "infer_clean" )
1397
+ clean_button .click (
1398
+ fn = clean , inputs = [], outputs = [sid0 ], api_name = "infer_clean"
1399
+ )
1398
1400
with gr .Group ():
1399
1401
gr .Markdown (
1400
1402
value = i18n ("男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. " )
@@ -1436,7 +1438,10 @@ def export_onnx(ModelPath, ExportedPath):
1436
1438
interactive = True ,
1437
1439
)
1438
1440
refresh_button .click (
1439
- fn = change_choices , inputs = [], outputs = [sid0 , file_index2 ], api_name = "infer_refresh"
1441
+ fn = change_choices ,
1442
+ inputs = [],
1443
+ outputs = [sid0 , file_index2 ],
1444
+ api_name = "infer_refresh" ,
1440
1445
)
1441
1446
# file_big_npy1 = gr.Textbox(
1442
1447
# label=i18n("特征文件路径"),
@@ -1737,7 +1742,10 @@ def export_onnx(ModelPath, ExportedPath):
1737
1742
but1 = gr .Button (i18n ("处理数据" ), variant = "primary" )
1738
1743
info1 = gr .Textbox (label = i18n ("输出信息" ), value = "" )
1739
1744
but1 .click (
1740
- preprocess_dataset , [trainset_dir4 , exp_dir1 , sr2 , np7 ], [info1 ], api_name = "train_preprocess"
1745
+ preprocess_dataset ,
1746
+ [trainset_dir4 , exp_dir1 , sr2 , np7 ],
1747
+ [info1 ],
1748
+ api_name = "train_preprocess" ,
1741
1749
)
1742
1750
with gr .Group ():
1743
1751
gr .Markdown (value = i18n ("step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)" ))
@@ -1994,7 +2002,12 @@ def export_onnx(ModelPath, ExportedPath):
1994
2002
with gr .Row ():
1995
2003
but7 = gr .Button (i18n ("修改" ), variant = "primary" )
1996
2004
info5 = gr .Textbox (label = i18n ("输出信息" ), value = "" , max_lines = 8 )
1997
- but7 .click (change_info , [ckpt_path0 , info_ , name_to_save1 ], info5 , api_name = "ckpt_modify" )
2005
+ but7 .click (
2006
+ change_info ,
2007
+ [ckpt_path0 , info_ , name_to_save1 ],
2008
+ info5 ,
2009
+ api_name = "ckpt_modify" ,
2010
+ )
1998
2011
with gr .Group ():
1999
2012
gr .Markdown (value = i18n ("查看模型信息(仅支持weights文件夹下提取的小模型文件)" ))
2000
2013
with gr .Row ():
@@ -2063,7 +2076,9 @@ def export_onnx(ModelPath, ExportedPath):
2063
2076
infoOnnx = gr .Label (label = "info" )
2064
2077
with gr .Row ():
2065
2078
butOnnx = gr .Button (i18n ("导出Onnx模型" ), variant = "primary" )
2066
- butOnnx .click (export_onnx , [ckpt_dir , onnx_dir ], infoOnnx , api_name = "export_onnx" )
2079
+ butOnnx .click (
2080
+ export_onnx , [ckpt_dir , onnx_dir ], infoOnnx , api_name = "export_onnx"
2081
+ )
2067
2082
2068
2083
tab_faq = i18n ("常见问题解答" )
2069
2084
with gr .TabItem (tab_faq ):
0 commit comments