Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ with gr.Blocks(theme="Hev832/Applio-Theme") as b:
|
|
78 |
with gr.Row():
|
79 |
stream_btn=gr.Button("Stream",interactive=True,visible=True)
|
80 |
sub_btn=gr.Button(interactive=False,visible=False)
|
81 |
-
gr.
|
82 |
out_aud=gr.Audio(streaming=True, autoplay=True)
|
83 |
with gr.Column(scale=1):
|
84 |
expbtn1=gr.Button("Example 1").click(exp1,None,[in_txt,load_file])
|
@@ -86,12 +86,13 @@ with gr.Blocks(theme="Hev832/Applio-Theme") as b:
|
|
86 |
expbtn3=gr.Button("Example 3").click(exp3,None,[in_txt,load_file])
|
87 |
with gr.Accordion("Model Config"):
|
88 |
json_ob=gr.JSON(label="JSON")
|
89 |
-
stream.change(button_on,stream,[stream_btn,sub_btn])
|
90 |
-
save_btn.click(save_set,[names,length,noise,width,sen_pause],save_file)
|
91 |
-
load_file.change(load_set,load_file,[names,length,noise,width,sen_pause])
|
92 |
-
names.change(load_mod,names,json_ob).then(clear_aud,None,out_aud)
|
93 |
-
stream_btn.click(pp.stream_tts,[in_txt,names,length,noise,width,sen_pause],out_aud)
|
94 |
-
sub_btn.click(clear_aud,None,out_aud).then(pp.tts,[in_txt,names,length,noise,width,sen_pause],out_aud)
|
|
|
95 |
b.load(init,None,names)
|
96 |
|
97 |
b.queue(default_concurrency_limit=20).launch(max_threads=40)
|
|
|
78 |
with gr.Row():
|
79 |
stream_btn=gr.Button("Stream",interactive=True,visible=True)
|
80 |
sub_btn=gr.Button(interactive=False,visible=False)
|
81 |
+
cancel_btn=gr.Button("Stop")
|
82 |
out_aud=gr.Audio(streaming=True, autoplay=True)
|
83 |
with gr.Column(scale=1):
|
84 |
expbtn1=gr.Button("Example 1").click(exp1,None,[in_txt,load_file])
|
|
|
86 |
expbtn3=gr.Button("Example 3").click(exp3,None,[in_txt,load_file])
|
87 |
with gr.Accordion("Model Config"):
|
88 |
json_ob=gr.JSON(label="JSON")
|
89 |
+
f1=stream.change(button_on,stream,[stream_btn,sub_btn])
|
90 |
+
f2=save_btn.click(save_set,[names,length,noise,width,sen_pause],save_file)
|
91 |
+
f3=load_file.change(load_set,load_file,[names,length,noise,width,sen_pause])
|
92 |
+
f4=names.change(load_mod,names,json_ob).then(clear_aud,None,out_aud)
|
93 |
+
f5=stream_btn.click(pp.stream_tts,[in_txt,names,length,noise,width,sen_pause],out_aud)
|
94 |
+
f6=sub_btn.click(clear_aud,None,out_aud).then(pp.tts,[in_txt,names,length,noise,width,sen_pause],out_aud)
|
95 |
+
cancel_btn.click(None,None,None,cancels=[f1,f2,f3,f4,f5,f6])
|
96 |
b.load(init,None,names)
|
97 |
|
98 |
b.queue(default_concurrency_limit=20).launch(max_threads=40)
|