aryo100 commited on
Commit
53d2b94
·
1 Parent(s): 2c216aa

update path model

Browse files
Files changed (1) hide show
  1. api.py +4 -4
api.py CHANGED
@@ -21,8 +21,8 @@ path_models = [
21
  # {
22
  # "name": "zeta",
23
  # "label": "Zeta",
24
- # "ckpt_path": "weights/zet_test1.pth",
25
- # "index_path": "weights/zet_test1.0.index"
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):