Lior-0618 commited on
Commit
1057f87
·
1 Parent(s): 4ee7e7e

fix: correct FER model path and STT error propagation

Browse files
Files changed (1) hide show
  1. api/main.py +3 -2
api/main.py CHANGED
@@ -110,8 +110,9 @@ def _init_fer() -> None:
110
 
111
  candidates = [
112
  os.environ.get("FER_MODEL_PATH", ""),
113
- "/app/models/emotion_model_web.onnx",
114
- os.path.join(os.path.dirname(__file__), "../../models/emotion_model_web.onnx"),
 
115
  ]
116
  fer_path = next((p for p in candidates if p and os.path.exists(p)), None)
117
  if not fer_path:
 
110
 
111
  candidates = [
112
  os.environ.get("FER_MODEL_PATH", ""),
113
+ "/app/models/emotion_model_web.onnx", # Docker
114
+ os.path.join(os.path.dirname(__file__), "../models/emotion_model_web.onnx"), # local: api/../models/
115
+ os.path.join(os.path.dirname(__file__), "../../models/emotion_model_web.onnx"), # fallback
116
  ]
117
  fer_path = next((p for p in candidates if p and os.path.exists(p)), None)
118
  if not fer_path: