Spaces:
Sleeping
Sleeping
Commit
·
f36ef67
1
Parent(s):
88ec987
update: link handling
Browse files
app.py
CHANGED
|
@@ -363,10 +363,10 @@ Return format:
|
|
| 363 |
|
| 364 |
[Question Title]
|
| 365 |
Total takes: [X] (Include ONLY if content appears more than once)
|
| 366 |
-
Take 1.
|
| 367 |
-
Take 2.
|
| 368 |
...
|
| 369 |
-
Take X (Best).
|
| 370 |
|
| 371 |
URL formatting:
|
| 372 |
- Convert timestamps to seconds (e.g., 10:13 → 613)
|
|
@@ -380,16 +380,26 @@ Take 1. 09:45 - 09:50
|
|
| 380 |
Take 2. 10:13 - 10:18
|
| 381 |
Best Answer: [10:13 - 10:18]({link_start}://roll.ai/colab/1234aq_12314/51234151?st=613&et=618)"""
|
| 382 |
else:
|
| 383 |
-
prompt = f"""Given the transcript {transcript},
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 393 |
"""
|
| 394 |
|
| 395 |
completion = client.chat.completions.create(
|
|
|
|
| 363 |
|
| 364 |
[Question Title]
|
| 365 |
Total takes: [X] (Include ONLY if content appears more than once)
|
| 366 |
+
[Take 1. start_time - end_time]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{start_time_in_sec}}&et={{end_time_in_sec}})
|
| 367 |
+
[Take 2. start_time - end_time]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{start_time_in_sec}}&et={{end_time_in_sec}})
|
| 368 |
...
|
| 369 |
+
[Take X (Best). start_time - end_time]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{start_time_in_sec}}&et={{end_time_in_sec}})
|
| 370 |
|
| 371 |
URL formatting:
|
| 372 |
- Convert timestamps to seconds (e.g., 10:13 → 613)
|
|
|
|
| 380 |
Take 2. 10:13 - 10:18
|
| 381 |
Best Answer: [10:13 - 10:18]({link_start}://roll.ai/colab/1234aq_12314/51234151?st=613&et=618)"""
|
| 382 |
else:
|
| 383 |
+
prompt = f"""Given the transcript {transcript}, 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 timestamp and duration for each topic.
|
| 384 |
+
|
| 385 |
+
Format the output as follows:
|
| 386 |
+
|
| 387 |
+
**Speaker Name**
|
| 388 |
+
1. [Topic title <div id='topic' style="display: inline"> 15s at 12:30 </div>]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{750}}&et={{765}})
|
| 389 |
+
2. [Topic title <div id='topic' style="display: inline"> 30s at 14:45 </div>]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{885}}&et={{915}})
|
| 390 |
+
3. [Topic title <div id='topic' style="display: inline"> 1m 10s at 16:20 </div>]({link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{980}}&et={{1050}})
|
| 391 |
+
|
| 392 |
+
Requirements:
|
| 393 |
+
- Only speaker names should be bold using markdown **Name**
|
| 394 |
+
- Topic titles should be in normal case (i.e first word of Sentence capital rest small)
|
| 395 |
+
- Use timestamp and duration format: HH:MM (Xs) where X is seconds
|
| 396 |
+
- Each line should be a clickable link including timestamp and title
|
| 397 |
+
- Convert display timestamps to seconds for URL parameters
|
| 398 |
+
Example: 15s at 10:13 in URL would be st=613&et=628
|
| 399 |
+
|
| 400 |
+
URL format: {link_start}://{{origin}}/collab/{{cid}}/{{rsid}}?st={{start_time_in_sec}}&et={{end_time_in_sec}}
|
| 401 |
+
|
| 402 |
+
Rank topics based on their potential virality and engagement for social media clips.
|
| 403 |
"""
|
| 404 |
|
| 405 |
completion = client.chat.completions.create(
|