litellm / services /whisper /utils /director.py
Ava2lon's picture
Upload 205 files
1425afc verified
Raw
History Blame Contribute Delete
559 Bytes
def rewrite_script(words):
"""
Converts raw transcript → structured viral script
"""
text = " ".join([w["text"] for w in words])
return {
"hook": f"Wait—{text[:60]}...",
"summary": text[:200],
"emotion": "high" if "!" in text else "medium"
}
def viral_score(engagement_curve):
"""
Evaluates full video potential
"""
if not engagement_curve:
return 0
peak = max(engagement_curve)
avg = sum(engagement_curve) / len(engagement_curve)
return (peak * 0.7) + (avg * 0.3)