Akjava commited on
Commit
41d1df8
·
verified ·
1 Parent(s): af21a79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -97,12 +97,12 @@ head = '''
97
  </script>
98
  '''
99
  with gr.Blocks(title="LLM with TTS",head=head) as demo:
100
- gr.Markdown("## Please be patient, the first response may have a delay of up to 20 seconds while loading.")
101
- gr.Markdown("**Qwen2.5-0.5B-Instruct/LJSpeech-q8(extremly slow:but Gradio Space need absolute onnx-url and url will block soon.so use github slow version here)**.LLM and TTS models will change without notice.")
102
  js = """
103
  function(chatbot){
104
  text = (chatbot[chatbot.length -1])["content"]
105
- window.MatchaTTSEn(text)
106
  }
107
  """
108
  chatbot = gr.Chatbot(type="messages")
@@ -132,4 +132,4 @@ with gr.Blocks(title="LLM with TTS",head=head) as demo:
132
 
133
  if __name__ == "__main__":
134
  init()
135
- demo.launch(share=True)
 
97
  </script>
98
  '''
99
  with gr.Blocks(title="LLM with TTS",head=head) as demo:
100
+ gr.Markdown("## Please be patient, the first response may have a delay of up to over 20 seconds while loading.")
101
+ gr.Markdown("**Qwen2.5-0.5B-Instruct/LJSpeech**.LLM and TTS models will change without notice.")
102
  js = """
103
  function(chatbot){
104
  text = (chatbot[chatbot.length -1])["content"]
105
+ window.MatchaTTSEn(text,"/file=models/ljspeech_sim.onnx")
106
  }
107
  """
108
  chatbot = gr.Chatbot(type="messages")
 
132
 
133
  if __name__ == "__main__":
134
  init()
135
+ demo.launch(allowed_paths=["/home/user/app/models/ljspeech_sim.onnx"],share=True)