Spaces:
Sleeping
Sleeping
Commit
·
dd57ac1
1
Parent(s):
e22ec09
update: si prompt
Browse files
app.py
CHANGED
@@ -339,21 +339,39 @@ def get_initial_analysis(
|
|
339 |
|
340 |
if ct == "si": # street interview
|
341 |
prompt = f"""This is a transcript for a street interview. Transcript: {transcript}
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
The
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
else:
|
358 |
prompt = f"""Given the transcript {transcript}, For All the speakers, short list all people, news, events, trends, and source that are discussed by speakers along with the start time of that topic and end time of that topic from the transcript. Rank all topics based on what would make for the best social clips. I need atleast 3 topics per speaker.
|
359 |
You should mention the Speaker Name first, then atleast 3 posts with their timestamps, and so on.
|
|
|
339 |
|
340 |
if ct == "si": # street interview
|
341 |
prompt = f"""This is a transcript for a street interview. Transcript: {transcript}
|
342 |
+
|
343 |
+
Your task is to analyze this street interview transcript and identify the final/best timestamps for each topic or question discussed. Here are the key rules:
|
344 |
+
|
345 |
+
1. For any topic/answer that appears multiple times in the transcript (even partially):
|
346 |
+
- The LAST occurrence is always considered the best version
|
347 |
+
- This includes cases where parts of an answer are scattered throughout the transcript
|
348 |
+
- Even slight variations of the same answer should be tracked
|
349 |
+
|
350 |
+
2. Introduction handling:
|
351 |
+
- Question 1 is ALWAYS the speaker's introduction/self-introduction
|
352 |
+
- If someone introduces themselves multiple times, use the last timestamp
|
353 |
+
- Include all variations of how they state their name/background
|
354 |
+
|
355 |
+
3. Question sequence:
|
356 |
+
- After the introduction, list questions in the order they were first asked
|
357 |
+
- If a question is revisited later, use the later timestamp
|
358 |
+
- Track partial answers to the same question across the transcript
|
359 |
+
|
360 |
+
Return format:
|
361 |
+
|
362 |
+
[Question Title]
|
363 |
+
Total takes: [X] (Include ONLY if content appears more than once)
|
364 |
+
[Best Answer: start_time - end_time]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{start_time_in_sec}}&et={{end_time_in_sec}})
|
365 |
+
|
366 |
+
URL formatting:
|
367 |
+
- Convert timestamps to seconds (e.g., 10:13 → 613)
|
368 |
+
- Format: {link_start}://[origin]/colab/[cid]/[rsid]?st=[start_seconds]&et=[end_seconds]
|
369 |
+
- Parameters after RSID must start with ? and subsequent parameters use &
|
370 |
+
|
371 |
+
Example:
|
372 |
+
1. Introduction
|
373 |
+
Total takes: 2
|
374 |
+
[Best Answer: 10:13 - 10:18]({link_start}://roll.ai/colab/1234aq_12314/51234151?st=613&et=618)"""
|
375 |
else:
|
376 |
prompt = f"""Given the transcript {transcript}, For All the speakers, short list all people, news, events, trends, and source that are discussed by speakers along with the start time of that topic and end time of that topic from the transcript. Rank all topics based on what would make for the best social clips. I need atleast 3 topics per speaker.
|
377 |
You should mention the Speaker Name first, then atleast 3 posts with their timestamps, and so on.
|