Spaces:
Sleeping
Sleeping
Commit
·
a46a731
1
Parent(s):
8116260
Update app.py
Browse files
app.py
CHANGED
@@ -27,6 +27,10 @@ class VitsGradio:
|
|
27 |
for dir in dirs:
|
28 |
self.modelPaths.append(dir)
|
29 |
with gr.Blocks() as self.Vits:
|
|
|
|
|
|
|
|
|
30 |
with gr.Tab("调试用"):
|
31 |
with gr.Row():
|
32 |
with gr.Column():
|
@@ -52,8 +56,8 @@ class VitsGradio:
|
|
52 |
self.api_input1 = gr.TextArea(label="输入api-key或本地存储说话模型的路径", value="https://platform.openai.com/account/api-keys")
|
53 |
with gr.Accordion(label="chatbot选择", open=False):
|
54 |
self.api_input2 = gr.Checkbox(value=True, label="采用gpt3.5")
|
55 |
-
self.local_chat1 = gr.Checkbox(value=False, label="启动本地chatbot")
|
56 |
-
self.local_chat2 = gr.Checkbox(value=True, label="是否量化")
|
57 |
res = gr.TextArea()
|
58 |
Botselection = gr.Button("完成chatbot设定")
|
59 |
Botselection.click(self.check_bot, inputs=[self.api_input1,self.api_input2,self.local_chat1,self.local_chat2], outputs = [res])
|
@@ -61,9 +65,9 @@ class VitsGradio:
|
|
61 |
self.input2 = gr.Dropdown(label="Language", choices=self.lan, value="自动", interactive=True)
|
62 |
with gr.Column():
|
63 |
btnVC = gr.Button("完成vits TTS端设定")
|
64 |
-
self.input3 = gr.Dropdown(label="Speaker", choices=list(range(
|
65 |
-
self.input4 = gr.Slider(minimum=0, maximum=1.0, label="更改噪声比例(noise scale),以控制情感", value=0.
|
66 |
-
self.input5 = gr.Slider(minimum=0, maximum=1.0, label="更改噪声偏差(noise scale w),以控制音素长短", value=0.
|
67 |
self.input6 = gr.Slider(minimum=0.1, maximum=10, label="duration", value=1)
|
68 |
statusa = gr.TextArea()
|
69 |
btnVC.click(self.create_tts_fn, inputs=[self.input1, self.input2, self.input3, self.input4, self.input5, self.input6], outputs = [statusa])
|
|
|
27 |
for dir in dirs:
|
28 |
self.modelPaths.append(dir)
|
29 |
with gr.Blocks() as self.Vits:
|
30 |
+
gr.Markdown(
|
31 |
+
"## <center> Vits chatbot后端演示,直接在本机上克隆并部署该space即可。搭配前端使用: https://github.com/Arkueid/Live2DMascot\n"
|
32 |
+
"### <center> 我移除了pyopenjtalk,如果合成不了日语就直接摆烂,所以不存在安装困难的情况\n"
|
33 |
+
"### <center> 如果有能力,可自行替换text文件夹\n")
|
34 |
with gr.Tab("调试用"):
|
35 |
with gr.Row():
|
36 |
with gr.Column():
|
|
|
56 |
self.api_input1 = gr.TextArea(label="输入api-key或本地存储说话模型的路径", value="https://platform.openai.com/account/api-keys")
|
57 |
with gr.Accordion(label="chatbot选择", open=False):
|
58 |
self.api_input2 = gr.Checkbox(value=True, label="采用gpt3.5")
|
59 |
+
#self.local_chat1 = gr.Checkbox(value=False, label="启动本地chatbot")
|
60 |
+
#self.local_chat2 = gr.Checkbox(value=True, label="是否量化")
|
61 |
res = gr.TextArea()
|
62 |
Botselection = gr.Button("完成chatbot设定")
|
63 |
Botselection.click(self.check_bot, inputs=[self.api_input1,self.api_input2,self.local_chat1,self.local_chat2], outputs = [res])
|
|
|
65 |
self.input2 = gr.Dropdown(label="Language", choices=self.lan, value="自动", interactive=True)
|
66 |
with gr.Column():
|
67 |
btnVC = gr.Button("完成vits TTS端设定")
|
68 |
+
self.input3 = gr.Dropdown(label="Speaker", choices=list(range(10)), value=1, interactive=True)
|
69 |
+
self.input4 = gr.Slider(minimum=0, maximum=1.0, label="更改噪声比例(noise scale),以控制情感", value=0.667)
|
70 |
+
self.input5 = gr.Slider(minimum=0, maximum=1.0, label="更改噪声偏差(noise scale w),以控制音素长短", value=0.8)
|
71 |
self.input6 = gr.Slider(minimum=0.1, maximum=10, label="duration", value=1)
|
72 |
statusa = gr.TextArea()
|
73 |
btnVC.click(self.create_tts_fn, inputs=[self.input1, self.input2, self.input3, self.input4, self.input5, self.input6], outputs = [statusa])
|