mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-01-20 02:51:09 +00:00
Format code (#526)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f92a923487
commit
a7647e4094
20
gui.py
20
gui.py
@@ -469,21 +469,21 @@ class GUI:
|
||||
self.flag_vc = False
|
||||
|
||||
def set_values(self, values):
|
||||
if(len(values["pth_path"].strip()) == 0):
|
||||
sg.popup(i18n('请选择pth文件'))
|
||||
if len(values["pth_path"].strip()) == 0:
|
||||
sg.popup(i18n("请选择pth文件"))
|
||||
return False
|
||||
if(len(values["index_path"].strip()) == 0):
|
||||
sg.popup(i18n('请选择index文件'))
|
||||
if len(values["index_path"].strip()) == 0:
|
||||
sg.popup(i18n("请选择index文件"))
|
||||
return False
|
||||
pattern = re.compile("[^\x00-\x7F]+")
|
||||
if(pattern.findall(values["hubert_path"])):
|
||||
sg.popup(i18n('hubert模型路径不可包含中文'))
|
||||
if pattern.findall(values["hubert_path"]):
|
||||
sg.popup(i18n("hubert模型路径不可包含中文"))
|
||||
return False
|
||||
if(pattern.findall(values["pth_path"])):
|
||||
sg.popup(i18n('pth文件路径不可包含中文'))
|
||||
if pattern.findall(values["pth_path"]):
|
||||
sg.popup(i18n("pth文件路径不可包含中文"))
|
||||
return False
|
||||
if(pattern.findall(values["index_path"])):
|
||||
sg.popup(i18n('index文件路径不可包含中文'))
|
||||
if pattern.findall(values["index_path"]):
|
||||
sg.popup(i18n("index文件路径不可包含中文"))
|
||||
return False
|
||||
self.set_devices(values["sg_input_device"], values["sg_output_device"])
|
||||
self.config.hubert_path = os.path.join(current_dir, "hubert_base.pt")
|
||||
|
||||
Reference in New Issue
Block a user