mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
14 lines
298 B
Python
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"
|