litellm / services /whisper /utils /retention.py
Ava2lon's picture
Upload 205 files
1425afc verified
Raw
History Blame Contribute Delete
394 Bytes
def predict_retention(words):
if not words:
return 0
duration = words[-1]["end"] - words[0]["start"]
score = 100
# too long → drop-off risk
if duration > 30:
score -= 30
# too short → no engagement
if duration < 6:
score -= 20
# weak opening signal
if "..." in words[0]["text"]:
score -= 10
return max(0, score)