mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-08 07:49:59 +08:00
修正了对gr3的支持
This commit is contained in:
parent
3d65166b35
commit
948fedbf1d
@ -17,8 +17,9 @@ from srt_utils import (
|
||||
|
||||
port = 8991
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
if len(sys.argv) > 2:
|
||||
port = int(sys.argv[1])
|
||||
is_share = eval(sys.argv[2])
|
||||
|
||||
|
||||
from i18n.i18n import I18nAuto
|
||||
@ -376,4 +377,19 @@ with gr.Blocks() as app:
|
||||
[save_folder, character],
|
||||
[character_warning],
|
||||
)
|
||||
app.launch(inbrowser=True, server_port=port, debug=True)
|
||||
if gr.__version__.split(".")[0] == "4":
|
||||
app.launch(
|
||||
server_name="0.0.0.0",
|
||||
inbrowser=True,
|
||||
share=is_share,
|
||||
server_port=port,
|
||||
quiet=True,
|
||||
)
|
||||
else:
|
||||
app.queue(concurrency_count=511, max_size=1022).launch(
|
||||
server_name="0.0.0.0",
|
||||
inbrowser=True,
|
||||
share=is_share,
|
||||
server_port=port,
|
||||
quiet=True,
|
||||
)
|
||||
|
2
webui.py
2
webui.py
@ -166,7 +166,7 @@ def change_label(if_label,path_list):
|
||||
def change_srt_slicer(if_srt_slicer):
|
||||
global p_srt_slicer
|
||||
if(if_srt_slicer==True and p_srt_slicer==None):
|
||||
cmd = '"%s" tools/srt_slicer/webui.py %s'%(python_exec,webui_port_srt_slicer)
|
||||
cmd = '"%s" tools/srt_slicer/webui.py %s %s'%(python_exec,webui_port_srt_slicer,is_share)
|
||||
yield i18n("SRT切割工具WebUI已开启")
|
||||
print(cmd)
|
||||
p_srt_slicer = Popen(cmd, shell=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user