Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions prompt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Your goal is to extract segments that have **Perfect Narrative Completeness** (S

### INPUT FORMAT EXPLAINED
The transcript below is a continuous text stream with embedded **Time Tags** like `(12s)`.
- Example: `"Hello world (0s). Today we are going to (3s) fly to the moon."`
- These tags represent the approximate timestamp of the *preceding* text.
- Example: `"(0s) Hello world. Today we are going to (3s) fly to the moon."`
- These tags represent the timestamp of the word following the tag.
- Use them to calculate duration. Duration = (End Tag - Start Tag).

### STRICT VIRAL RULES (The "ViralCutter Standard"):
Expand Down
7 changes: 3 additions & 4 deletions scripts/create_viral_segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def preprocess_transcript_for_ai(segments):

# Try to start with (0s) based on first segment
first_start = segments[0].get('start', 0)
full_text += f"({int(first_start)}s) "
full_text += f"({first_start:.2f}s) "
last_tag_time = first_start

for seg in segments:
Expand All @@ -190,9 +190,8 @@ def preprocess_transcript_for_ai(segments):

full_text += text + " "

if end_time - last_tag_time >= 4:
full_text += f"({int(end_time)}s) "
last_tag_time = end_time
full_text += f"({int(end_time)}s) "
last_tag_time = end_time

return full_text.strip()

Expand Down