Skip to content

Commit fd45055

Browse files
committed
Fix Render deploy: remove py3.14 pin, include model
1 parent bb1eba6 commit fd45055

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ __pycache__/
55
*.egg-info/
66
.venv/
77
venv/
8-
*.joblib
8+
# *.joblib # committed for Render deployment
99

1010
# Node
1111
node_modules/

ml/predict.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
def load_model():
1919
global _model, _meta
2020
if _model is None:
21+
if not MODEL_PATH.exists():
22+
from ml.train import train
23+
24+
print("Model not found. Training on first load...")
25+
train()
2126
_model = joblib.load(MODEL_PATH)
2227
with open(META_PATH) as f:
2328
_meta = json.load(f)

models/pe_detector.joblib

1.37 MB
Binary file not shown.

render.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,3 @@ services:
66
plan: free
77
buildCommand: pip install -r requirements.txt
88
startCommand: uvicorn api.routes:app --host 0.0.0.0 --port $PORT
9-
envVars:
10-
- key: PYTHON_VERSION
11-
value: 3.14.0

0 commit comments

Comments
 (0)