add splitter
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ head = '''
|
|
| 49 |
import { matcha_tts,env ,start_thread_play_tts} from "https://akjava.github.io/Matcha-TTS-Japanese/js-esm/matcha_tts_onnx_en.js";
|
| 50 |
window.MatchaTTSEn = matcha_tts
|
| 51 |
window.start_threads = async function(){
|
| 52 |
-
//sadly onload unstable
|
| 53 |
//console.log("start_threads")
|
| 54 |
await start_thread_play_tts();
|
| 55 |
await start_multi_line_tts();
|
|
@@ -142,14 +142,13 @@ window.reset_tts_text = reset_tts_text
|
|
| 142 |
|
| 143 |
with gr.Blocks(title="LLM with TTS",head=head) as demo:
|
| 144 |
gr.Markdown("## A LLM is unstable:The inference client used in this demo exhibits inconsistent performance. While it can provide responses in milliseconds, it sometimes becomes unresponsive and times out.")
|
| 145 |
-
gr.Markdown("
|
| 146 |
gr.Markdown("**Mistral-7B-Instruct-v0.3/LJSpeech**.LLM and TTS models will change without notice.")
|
| 147 |
|
| 148 |
js = """
|
| 149 |
function(chatbot){
|
| 150 |
window.update_chatbot(chatbot)
|
| 151 |
var chatElement = document.getElementById('gr-chatbot');
|
| 152 |
-
console.log(chatElement.scrollHeight)
|
| 153 |
chatElement.scrollTop = chatElement.scrollHeight;
|
| 154 |
var logElement = chatElement.querySelector('div[role="log"]');
|
| 155 |
logElement.scrollTop = logElement.scrollHeight;
|
|
|
|
| 49 |
import { matcha_tts,env ,start_thread_play_tts} from "https://akjava.github.io/Matcha-TTS-Japanese/js-esm/matcha_tts_onnx_en.js";
|
| 50 |
window.MatchaTTSEn = matcha_tts
|
| 51 |
window.start_threads = async function(){
|
| 52 |
+
//sadly onload unstable.only me or gradle
|
| 53 |
//console.log("start_threads")
|
| 54 |
await start_thread_play_tts();
|
| 55 |
await start_multi_line_tts();
|
|
|
|
| 142 |
|
| 143 |
with gr.Blocks(title="LLM with TTS",head=head) as demo:
|
| 144 |
gr.Markdown("## A LLM is unstable:The inference client used in this demo exhibits inconsistent performance. While it can provide responses in milliseconds, it sometimes becomes unresponsive and times out.")
|
| 145 |
+
gr.Markdown("### TTS talke a long loading time:Please be patient, the first response may have a delay of up to over 40 seconds while loading.")
|
| 146 |
gr.Markdown("**Mistral-7B-Instruct-v0.3/LJSpeech**.LLM and TTS models will change without notice.")
|
| 147 |
|
| 148 |
js = """
|
| 149 |
function(chatbot){
|
| 150 |
window.update_chatbot(chatbot)
|
| 151 |
var chatElement = document.getElementById('gr-chatbot');
|
|
|
|
| 152 |
chatElement.scrollTop = chatElement.scrollHeight;
|
| 153 |
var logElement = chatElement.querySelector('div[role="log"]');
|
| 154 |
logElement.scrollTop = logElement.scrollHeight;
|