Skip to content

Commit b2f816a

Browse files
Format code (#891)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 9f7fe29 commit b2f816a

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

infer-web.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,9 @@ def export_onnx(ModelPath, ExportedPath):
13941394
visible=False,
13951395
interactive=True,
13961396
)
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+
)
13981400
with gr.Group():
13991401
gr.Markdown(
14001402
value=i18n("男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ")
@@ -1436,7 +1438,10 @@ def export_onnx(ModelPath, ExportedPath):
14361438
interactive=True,
14371439
)
14381440
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",
14401445
)
14411446
# file_big_npy1 = gr.Textbox(
14421447
# label=i18n("特征文件路径"),
@@ -1737,7 +1742,10 @@ def export_onnx(ModelPath, ExportedPath):
17371742
but1 = gr.Button(i18n("处理数据"), variant="primary")
17381743
info1 = gr.Textbox(label=i18n("输出信息"), value="")
17391744
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",
17411749
)
17421750
with gr.Group():
17431751
gr.Markdown(value=i18n("step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)"))
@@ -1994,7 +2002,12 @@ def export_onnx(ModelPath, ExportedPath):
19942002
with gr.Row():
19952003
but7 = gr.Button(i18n("修改"), variant="primary")
19962004
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+
)
19982011
with gr.Group():
19992012
gr.Markdown(value=i18n("查看模型信息(仅支持weights文件夹下提取的小模型文件)"))
20002013
with gr.Row():
@@ -2063,7 +2076,9 @@ def export_onnx(ModelPath, ExportedPath):
20632076
infoOnnx = gr.Label(label="info")
20642077
with gr.Row():
20652078
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+
)
20672082

20682083
tab_faq = i18n("常见问题解答")
20692084
with gr.TabItem(tab_faq):

0 commit comments

Comments
 (0)