chore(format): run black on dev (#1484)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2023-11-06 15:42:26 +09:00 committed by GitHub
parent 3f7644b56a
commit ee6c50bdbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 15 deletions

View File

@ -33,7 +33,6 @@ import shutil
import logging import logging
logging.getLogger("numba").setLevel(logging.WARNING) logging.getLogger("numba").setLevel(logging.WARNING)
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -439,7 +438,8 @@ def change_version19(sr2, if_f0_3, version19):
def change_f0(if_f0_3, sr2, version19): # f0method8,pretrained_G14,pretrained_D15 def change_f0(if_f0_3, sr2, version19): # f0method8,pretrained_G14,pretrained_D15
path_str = "" if version19 == "v1" else "_v2" path_str = "" if version19 == "v1" else "_v2"
return ( return (
{"visible": if_f0_3, "__type__": "update"},{"visible": if_f0_3, "__type__": "update"}, {"visible": if_f0_3, "__type__": "update"},
{"visible": if_f0_3, "__type__": "update"},
*get_pretrained_models(path_str, "f0" if if_f0_3 == True else "", sr2), *get_pretrained_models(path_str, "f0" if if_f0_3 == True else "", sr2),
) )
@ -781,9 +781,7 @@ with gr.Blocks(title="RVC WebUI") as app:
with gr.Row(): with gr.Row():
sid0 = gr.Dropdown(label=i18n("推理音色"), choices=sorted(names)) sid0 = gr.Dropdown(label=i18n("推理音色"), choices=sorted(names))
with gr.Column(): with gr.Column():
refresh_button = gr.Button( refresh_button = gr.Button(i18n("刷新音色列表和索引路径"), variant="primary")
i18n("刷新音色列表和索引路径"), variant="primary"
)
clean_button = gr.Button(i18n("卸载音色省显存"), variant="primary") clean_button = gr.Button(i18n("卸载音色省显存"), variant="primary")
spk_item = gr.Slider( spk_item = gr.Slider(
minimum=0, minimum=0,
@ -873,7 +871,8 @@ with gr.Blocks(title="RVC WebUI") as app:
interactive=True, interactive=True,
) )
f0_file = gr.File( f0_file = gr.File(
label=i18n("F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调"),visible=False label=i18n("F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调"),
visible=False,
) )
refresh_button.click( refresh_button.click(

View File

@ -170,12 +170,14 @@ class VC:
self.hubert_model = load_hubert(self.config) self.hubert_model = load_hubert(self.config)
if file_index: if file_index:
file_index = file_index.strip(" ") \ file_index = (
.strip('"') \ file_index.strip(" ")
.strip("\n") \ .strip('"')
.strip('"') \ .strip("\n")
.strip(" ") \ .strip('"')
.strip(" ")
.replace("trained", "added") .replace("trained", "added")
)
elif file_index2: elif file_index2:
file_index = file_index2 file_index = file_index2
else: else: