NickVerri commited on
Commit
5ff72a8
·
verified ·
1 Parent(s): 20c4a2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -53,11 +53,16 @@ def call_gemini_for_edl(transcript_data, story_prompt, api_key):
53
 
54
  url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-09-2025:generateContent?key={api_key}"
55
 
 
56
  system_prompt = (
57
  "You are an expert Documentary Senior Editor. Use the provided transcript JSON "
58
  "(which includes Speaker IDs and word-level timestamps) to create a condensed story. "
59
  "Output ONLY a valid JSON array of segments with 'src_start', 'src_end', and 'note'. "
60
- "Rules: Remove fluff/repeats, ignore interviewer interruptions, and focus on the hook."
 
 
 
 
61
  )
62
 
63
  payload = {
 
53
 
54
  url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-09-2025:generateContent?key={api_key}"
55
 
56
+ # Updated system prompt to explicitly ignore interviewer comments
57
  system_prompt = (
58
  "You are an expert Documentary Senior Editor. Use the provided transcript JSON "
59
  "(which includes Speaker IDs and word-level timestamps) to create a condensed story. "
60
  "Output ONLY a valid JSON array of segments with 'src_start', 'src_end', and 'note'. "
61
+ "CRITICAL RULES:\n"
62
+ "1. IGNORE ALL INTERVIEWER COMMENTS: Do not include any speech or segments where the interviewer is speaking.\n"
63
+ "2. REMOVE FLUFF: Delete 'um', 'ah', repeats, and irrelevant filler.\n"
64
+ "3. NARRATIVE FLOW: Focus on the subject's high-energy responses and narrative hooks.\n"
65
+ "4. TIMESTAMP INTEGRITY: Use only the exact word-level start and end times from the data."
66
  )
67
 
68
  payload = {