Spaces:
Sleeping
Sleeping
update path model
Browse files
api.py
CHANGED
|
@@ -21,8 +21,8 @@ path_models = [
|
|
| 21 |
# {
|
| 22 |
# "name": "zeta",
|
| 23 |
# "label": "Zeta",
|
| 24 |
-
# "ckpt_path": "
|
| 25 |
-
# "index_path": "
|
| 26 |
# },
|
| 27 |
{
|
| 28 |
"name": "zeta",
|
|
@@ -161,8 +161,8 @@ async def tts_api(req: TTSRequest):
|
|
| 161 |
if not model:
|
| 162 |
raise HTTPException(status_code=404, detail=f"Model '{req.name}' not found.")
|
| 163 |
|
| 164 |
-
ckpt_path = model["ckpt_path"]
|
| 165 |
-
index_path = model["index_path"]
|
| 166 |
|
| 167 |
# Cek file model dan index
|
| 168 |
if not os.path.isfile(ckpt_path):
|
|
|
|
| 21 |
# {
|
| 22 |
# "name": "zeta",
|
| 23 |
# "label": "Zeta",
|
| 24 |
+
# "ckpt_path": "zet_test1.pth",
|
| 25 |
+
# "index_path": "zet_test1.0.index"
|
| 26 |
# },
|
| 27 |
{
|
| 28 |
"name": "zeta",
|
|
|
|
| 161 |
if not model:
|
| 162 |
raise HTTPException(status_code=404, detail=f"Model '{req.name}' not found.")
|
| 163 |
|
| 164 |
+
ckpt_path = os.path.join("weights", model["ckpt_path"])
|
| 165 |
+
index_path = os.path.join("weights", model["index_path"])
|
| 166 |
|
| 167 |
# Cek file model dan index
|
| 168 |
if not os.path.isfile(ckpt_path):
|