AhmadMustafa commited on
Commit
06a5ce9
·
1 Parent(s): a24d57f

update: street interview prompt for number of takes

Browse files
Files changed (1) hide show
  1. app.py +14 -13
app.py CHANGED
@@ -339,19 +339,20 @@ 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
- 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.
 
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
+ Even if the answer is scattered across the transcript, the last occurence of the topic is the best answer for that topic.
346
+ 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.
347
+ 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.
348
+ Return format is:
349
+ 1. Question Title
350
+ Total takes: (Only include this if Number of takes is > 1 otherwise ignore it.)
351
+ [Best Answer: start_time - end_time]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{start_time_in_sec}}&et={{end_time_in_sec}}"').
352
+ For Example:
353
+ If the start time is 10:13 and end time is 10:18, the url will be:
354
+ {link_start}://roll.ai/colab/1234aq_12314/51234151?st=613&et=618
355
+ 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.
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.