Spaces:
Running
Running
Commit
·
3c9d498
1
Parent(s):
5416d7e
update: live event prompt test
Browse files
app.py
CHANGED
@@ -383,46 +383,55 @@ Total takes: 2
|
|
383 |
- [Take 1. <div id='topic' style="display: inline"> 20s at 25:45]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{1245}}&et={{1265}})
|
384 |
- [Take 3 (Best). <div id='topic' style="display: inline"> 5s at 10:13 </div>]({link_start}://roll.ai/colab/1234aq_12314/51234151?st=613&et=618)"""
|
385 |
else:
|
386 |
-
prompt = f"""<div id="initial_message">
|
387 |
-
{transcript}
|
388 |
-
Analyze all speakers' discussions and list out people, news, events, trends, and sources mentioned. For each speaker, provide at least 3 topics that would make engaging social media clips. Include duration and starting time for each topic.
|
389 |
|
390 |
-
Format
|
391 |
|
|
|
392 |
**Speaker Name**
|
393 |
-
1. [Topic title <div id='topic' style="display: inline">
|
394 |
-
2. [Topic title <div id='topic' style="display: inline">
|
395 |
-
3. [Topic title <div id='topic' style="display: inline">
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
-
|
400 |
-
|
401 |
-
|
402 |
-
-
|
403 |
-
-
|
404 |
-
|
405 |
-
- Convert display
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
"""
|
412 |
-
|
413 |
completion = client.chat.completions.create(
|
414 |
model="gpt-4o-mini",
|
415 |
messages=[
|
416 |
{
|
417 |
"role": "system",
|
418 |
-
"content": f"""You are
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
|
|
426 |
},
|
427 |
{"role": "user", "content": prompt},
|
428 |
],
|
|
|
383 |
- [Take 1. <div id='topic' style="display: inline"> 20s at 25:45]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{1245}}&et={{1265}})
|
384 |
- [Take 3 (Best). <div id='topic' style="display: inline"> 5s at 10:13 </div>]({link_start}://roll.ai/colab/1234aq_12314/51234151?st=613&et=618)"""
|
385 |
else:
|
386 |
+
prompt = f"""<div id="initial_message">
|
387 |
+
Given the transcript {transcript}, analyze speakers' discussions to identify compelling social media clips. For each speaker, identify key topics that mention people, news, events, trends, or sources.
|
|
|
388 |
|
389 |
+
Format requirements:
|
390 |
|
391 |
+
1. SPEAKER FORMAT:
|
392 |
**Speaker Name**
|
393 |
+
1. [Topic title <div id='topic' style="display: inline"> 20s at 12:30 </div>]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{750}}&et={{770}})
|
394 |
+
2. [Topic title <div id='topic' style="display: inline"> 45s at 14:45 </div>]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{885}}&et={{930}})
|
395 |
+
3. [Topic title <div id='topic' style="display: inline"> 55s at 16:20 </div>]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{980}}&et={{1035}})
|
396 |
+
|
397 |
+
2. TIMESTAMP RULES:
|
398 |
+
- Start time (st): Must begin exactly when speaker starts discussing the specific topic
|
399 |
+
- End time (et): Must end exactly when either:
|
400 |
+
* The speaker completes their point, or
|
401 |
+
* Before the next speaker begins
|
402 |
+
- NO OVERLAP: Selected duration must NEVER include dialogue from other speakers
|
403 |
+
- Duration limits: Minimum 20 seconds, maximum 60 seconds
|
404 |
+
- Time format: "Xs at HH:MM" where X = seconds
|
405 |
+
- URL parameters: Convert display times to seconds
|
406 |
+
Example: "25s at 10:13" → st=613&et=638
|
407 |
+
|
408 |
+
3. FORMATTING RULES:
|
409 |
+
- Speaker names: Use markdown bold (**Name**)
|
410 |
+
- Topic titles: First word capitalized, rest lowercase
|
411 |
+
- Each topic must be a clickable link with correct timestamp
|
412 |
+
- URL format: {link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{start_time_in_sec}}&et={{end_time_in_sec}}
|
413 |
+
|
414 |
+
4. TOPIC SELECTION:
|
415 |
+
- Prioritize engaging, viral-worthy content
|
416 |
+
- Minimum 2 topics per speaker, aim for 3 if available
|
417 |
+
- Topics should be self-contained discussions within the timestamp
|
418 |
+
- Skip speakers if fewer than 2 compelling topics found</div>
|
419 |
"""
|
420 |
+
print(prompt)
|
421 |
completion = client.chat.completions.create(
|
422 |
model="gpt-4o-mini",
|
423 |
messages=[
|
424 |
{
|
425 |
"role": "system",
|
426 |
+
"content": f"""You are analyzing a transcript for Call ID: {cid}, Session ID: {rsid}, Origin: {origin}, Call Type: {ct}.
|
427 |
+
|
428 |
+
CORE REQUIREMENTS:
|
429 |
+
1. TIMESTAMPS: Each clip must contain ONLY the specified speaker's dialogue about a single topic. No overlapping dialogue from other speakers.
|
430 |
+
2. DURATION: Clips must be 20-60 seconds long
|
431 |
+
3. CONTENT: Select engaging, viral-worthy topics
|
432 |
+
4. COVERAGE: Minimum 2 topics per speaker, aim for 3 if good content exists
|
433 |
+
|
434 |
+
Prioritize accuracy in timestamp selection over quantity of clips.""",
|
435 |
},
|
436 |
{"role": "user", "content": prompt},
|
437 |
],
|