Spaces:
Running
Running
Update main.ts
Browse files
main.ts
CHANGED
@@ -283,7 +283,7 @@ async function handleDemoRequest(req: Request) {
|
|
283 |
const models = await response.json();
|
284 |
const voiceSelect = document.getElementById('voiceSelect');
|
285 |
|
286 |
-
|
287 |
const option = document.createElement('option');
|
288 |
option.value = model.model;
|
289 |
option.textContent = model.model;
|
@@ -306,8 +306,8 @@ async function handleDemoRequest(req: Request) {
|
|
306 |
--data-raw '{"model":"brian","input":"привет! хрю-хрю!","voice":"rate:0|pitch:0"}' \\\\\\\\
|
307 |
-o tts_voice.mp3
|
308 |
\`;
|
309 |
-
apiVoices.textContent = voices_pre.replace(/\\\\\\\\/g, '\\\\')
|
310 |
-
apiExamples.textContent = examples_pre.replace(/\\\\\\\\/g, '\\\\')
|
311 |
|
312 |
}
|
313 |
createApiExamples();
|
|
|
283 |
const models = await response.json();
|
284 |
const voiceSelect = document.getElementById('voiceSelect');
|
285 |
|
286 |
+
models.forEach((model, index) => {
|
287 |
const option = document.createElement('option');
|
288 |
option.value = model.model;
|
289 |
option.textContent = model.model;
|
|
|
306 |
--data-raw '{"model":"brian","input":"привет! хрю-хрю!","voice":"rate:0|pitch:0"}' \\\\\\\\
|
307 |
-o tts_voice.mp3
|
308 |
\`;
|
309 |
+
apiVoices.textContent = voices_pre.replace(/\\\\\\\\/g, '\\\\');
|
310 |
+
apiExamples.textContent = examples_pre.replace(/\\\\\\\\/g, '\\\\');
|
311 |
|
312 |
}
|
313 |
createApiExamples();
|