Spaces:
Sleeping
Sleeping
Commit
·
a24d57f
1
Parent(s):
94b9c52
update: street interview added
Browse files
app.py
CHANGED
@@ -337,24 +337,24 @@ def get_initial_analysis(
|
|
337 |
else:
|
338 |
link_start = "https"
|
339 |
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
You should mention the Speaker Name first, then atleast 3 posts with their timestamps, and so on.
|
359 |
Return format is:
|
360 |
Speaker Name
|
|
|
337 |
else:
|
338 |
link_start = "https"
|
339 |
|
340 |
+
if ct == "si": # street interview
|
341 |
+
prompt = f"""This is a transcript for a street interview. Transcript: {transcript}
|
342 |
+
In this street interview, the host asks multiple questions to the interviewees.
|
343 |
+
The interviewee can repeat a single answer multiple time to get the best take.
|
344 |
+
Your job is to find out the timestamp of the best answer given by the interviewee (Do not include the Question timestamp by interviwer in this). If there are multiple attempts for a question, best part is the last part of the question. If no question was asked but something is repeated, please include that in the answer as well
|
345 |
+
The way to know if there are multiple takes to a question is to see in the transcript if the same text is repeated, If not then number of takes is 1.
|
346 |
+
Question 1 should always be the introduction if the speaker has introduced themselves to find the best introduction time (Last timestamp is the best timestamp), Rest of questions should be in the order they were asked.
|
347 |
+
Return format is:
|
348 |
+
1. Question Title
|
349 |
+
Number of takes: number
|
350 |
+
[Best Answer: start_time - end_time]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{start_time_in_sec}}&et={{end_time_in_sec}}"').
|
351 |
+
For Example:
|
352 |
+
If the start time is 10:13 and end time is 10:18, the url will be:
|
353 |
+
{link_start}://roll.ai/colab/1234aq_12314/51234151?st=613&et=618
|
354 |
+
In the URL, make sure that after RSID there is ? and then rest of the fields are added via &. Keep the answer less verbose and to the point.
|
355 |
+
"""
|
356 |
+
else:
|
357 |
+
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.
|
358 |
You should mention the Speaker Name first, then atleast 3 posts with their timestamps, and so on.
|
359 |
Return format is:
|
360 |
Speaker Name
|