studio / utils /engagement.py
Ava2lon's picture
Upload 170 files
345855e verified
Raw
History Blame Contribute Delete
320 Bytes
def simulate_retention(words):
timeline = []
score = 100
for i, w in enumerate(words):
# drop-off logic
if i > len(words) * 0.7:
score -= 2
if w["text"].lower() in ["boring", "slow"]:
score -= 10
timeline.append(max(score, 0))
return timeline