Model/backend/app/bulk_uploads/scoring.py
2026-04-21 20:23:33 +00:00

14 lines
298 B
Python

from typing import Optional
HIGH_THRESHOLD = 0.85
MED_THRESHOLD = 0.65
def score_bucket(score: Optional[float]) -> Optional[str]:
if score is None:
return None
if score >= HIGH_THRESHOLD:
return "high"
if score >= MED_THRESHOLD:
return "med"
return "low"