ikechan8370 commited on
Commit
da1bc29
1 Parent(s): 1cc7aeb

feat: add api for generate

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -114,10 +114,10 @@ if __name__ == '__main__':
114
  o2 = gr.Audio(label="Output Audio", elem_id=f"tts-audio")
115
  o3 = gr.Textbox(label="Extra Info")
116
  download = gr.Button("Download Audio")
117
- btn.click(vits, inputs=[input_text, lang, sid, ns, nsw, ls], outputs=[o1, o2, o3])
118
  download.click(None, [], [], _js=download_audio_js.format())
119
  btn2.click(search_speaker, inputs=[search], outputs=[sid])
120
  lang.change(change_lang, inputs=[lang], outputs=[ns, nsw, ls])
121
  with gr.TabItem("可用人物一览"):
122
  gr.Radio(label="Speaker", choices=speakers, interactive=False, type="index")
123
- app.queue(concurrency_count=1).launch()
 
114
  o2 = gr.Audio(label="Output Audio", elem_id=f"tts-audio")
115
  o3 = gr.Textbox(label="Extra Info")
116
  download = gr.Button("Download Audio")
117
+ btn.click(vits, inputs=[input_text, lang, sid, ns, nsw, ls], outputs=[o1, o2, o3], api_name="generate")
118
  download.click(None, [], [], _js=download_audio_js.format())
119
  btn2.click(search_speaker, inputs=[search], outputs=[sid])
120
  lang.change(change_lang, inputs=[lang], outputs=[ns, nsw, ls])
121
  with gr.TabItem("可用人物一览"):
122
  gr.Radio(label="Speaker", choices=speakers, interactive=False, type="index")
123
+ app.queue(concurrency_count=1).launch(share=True)