Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -57,13 +57,15 @@ import soundfile as sf
|
|
57 |
#from IPython.display import display, Audio, Markdown, clear_output
|
58 |
from piper_phonemize import phonemize_codepoints, phonemize_espeak, tashkeel_run
|
59 |
|
60 |
-
#@app.get("/", response_class=HTMLResponse)
|
61 |
-
#async def read_root(request: Request):
|
62 |
-
# return templates.TemplateResponse("interface.html", {"request": request, "data": data})
|
63 |
@app.get("/", response_class=HTMLResponse)
|
64 |
async def read_root(request: Request):
|
65 |
-
#
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
67 |
import json
|
68 |
_LOGGER = logging.getLogger("piper_train.infer_onnx")
|
69 |
import os
|
|
|
57 |
#from IPython.display import display, Audio, Markdown, clear_output
|
58 |
from piper_phonemize import phonemize_codepoints, phonemize_espeak, tashkeel_run
|
59 |
|
|
|
|
|
|
|
60 |
@app.get("/", response_class=HTMLResponse)
|
61 |
async def read_root(request: Request):
|
62 |
+
# You should populate data and model_configurations here
|
63 |
+
# Make sure speaker_id_map is defined and populated correctly
|
64 |
+
# data = {"your_data_key": "your_data_value"} # Replace with your data
|
65 |
+
# model_configurations = {} # Replace with your model configurations
|
66 |
+
|
67 |
+
# Ensure that speaker_id_map is included in the context
|
68 |
+
return templates.TemplateResponse("interface.html", {"request": request, "data": data, "model_names": model_configurations.keys(), "speaker_id_map": speaker_id_map})
|
69 |
import json
|
70 |
_LOGGER = logging.getLogger("piper_train.infer_onnx")
|
71 |
import os
|