Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,12 @@ from fastapi import FastAPI, Request, Form
|
|
17 |
from fastapi.responses import HTMLResponse
|
18 |
from fastapi.responses import FileResponse
|
19 |
from fastapi.templating import Jinja2Templates
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
import logging
|
21 |
|
22 |
app = FastAPI()
|
@@ -52,6 +58,7 @@ import soundfile as sf
|
|
52 |
from IPython.display import display, Audio, Markdown, clear_output
|
53 |
from piper_phonemize import phonemize_codepoints, phonemize_espeak, tashkeel_run
|
54 |
|
|
|
55 |
_LOGGER = logging.getLogger("piper_train.infer_onnx")
|
56 |
import os
|
57 |
#if not os.path.exists("./content/piper/src/python/lng"):
|
|
|
17 |
from fastapi.responses import HTMLResponse
|
18 |
from fastapi.responses import FileResponse
|
19 |
from fastapi.templating import Jinja2Templates
|
20 |
+
from fastapi.staticfiles import StaticFiles
|
21 |
+
|
22 |
+
# ...
|
23 |
+
# Mount a directory to serve static files (e.g., CSS and JavaScript)
|
24 |
+
app.mount("/static", StaticFiles(directory="static"), name="static")
|
25 |
+
|
26 |
import logging
|
27 |
|
28 |
app = FastAPI()
|
|
|
58 |
from IPython.display import display, Audio, Markdown, clear_output
|
59 |
from piper_phonemize import phonemize_codepoints, phonemize_espeak, tashkeel_run
|
60 |
|
61 |
+
|
62 |
_LOGGER = logging.getLogger("piper_train.infer_onnx")
|
63 |
import os
|
64 |
#if not os.path.exists("./content/piper/src/python/lng"):
|