Spaces:
Sleeping
Sleeping
Commit
·
37f2606
1
Parent(s):
fd51374
hardcode: msg for cid
Browse files
app.py
CHANGED
|
@@ -23,7 +23,58 @@ client = OpenAI()
|
|
| 23 |
def get_initial_analysis(
|
| 24 |
transcript_processor: TranscriptProcessor, cid, rsid, origin, ct, uid
|
| 25 |
) -> Generator[str, None, None]:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
"""Perform initial analysis of the transcript using OpenAI."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
try:
|
| 28 |
transcript = transcript_processor.get_transcript()
|
| 29 |
speaker_mapping = transcript_processor.speaker_mapping
|
|
|
|
| 23 |
def get_initial_analysis(
|
| 24 |
transcript_processor: TranscriptProcessor, cid, rsid, origin, ct, uid
|
| 25 |
) -> Generator[str, None, None]:
|
| 26 |
+
# {
|
| 27 |
+
# "p_name": "Roll4 Demo",
|
| 28 |
+
# "p_email": "roll.demo.4@gmail.com",
|
| 29 |
+
# "p_uid": "56a82610-5a8d-11ef-a41a-02aa9bfd29a3",
|
| 30 |
+
# "p_role": "GUEST",
|
| 31 |
+
# "p_id": 10952,
|
| 32 |
+
# "f_id": "F759EDEC-9299-49BB-9759-52BB877F534E",
|
| 33 |
+
# "f_name": "F2 Roll4D iPhone2x",
|
| 34 |
+
# "f_type": "2x",
|
| 35 |
+
# "callId": "9v3b-j426-kxxv_2024-11-19T204924",
|
| 36 |
+
# "callDeviceId": "BDE690C3-E197-41E9-BC56-3E3AE2CD5A62",
|
| 37 |
+
# "recordingSessionId": "2024-11-19T223131",
|
| 38 |
+
# "time": "19 Nov 2024, 22:31:31",
|
| 39 |
+
# "timestamp": 1732055491000,
|
| 40 |
+
# "timerange": "1732054891000 - 1732059091000",
|
| 41 |
+
# }
|
| 42 |
"""Perform initial analysis of the transcript using OpenAI."""
|
| 43 |
+
if cid == "9v3b-j426-kxxv_2024-11-19T204924" and rsid == "2024-11-19T223131":
|
| 44 |
+
hardcoded_message = """**Mala Ramakrishnan**
|
| 45 |
+
1. [Introduction and Event Overview <div id='topic' style="display: inline"> 40s at 03:20 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=200&et=240&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)
|
| 46 |
+
2. [Advice for Startup Founders <div id='topic' style="display: inline"> 45s at 26:10 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=1570&et=1615&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)
|
| 47 |
+
|
| 48 |
+
**Raymond Lee**
|
| 49 |
+
1. [Event Introduction and Agenda <div id='topic' style="display: inline"> 120s at 00:39 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=39&et=159&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)
|
| 50 |
+
2. [Introduction of Mala Ramakrishnan <div id='topic' style="display: inline"> 20s at 02:51 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=171&et=191&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)
|
| 51 |
+
|
| 52 |
+
**Vince Lane**
|
| 53 |
+
1. [Introduction and Background <div id='topic' style="display: inline"> 60s at 04:42 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=282&et=342&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)
|
| 54 |
+
2. [Advice for Founders <div id='topic' style="display: inline"> 60s at 19:48 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=1188&et=1248&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)
|
| 55 |
+
|
| 56 |
+
**Marriott Wharton**
|
| 57 |
+
1. [Introduction and Investment Focus <div id='topic' style="display: inline"> 60s at 06:36 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=396&et=456&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)
|
| 58 |
+
2. [AI as a Fundamental Tool <div id='topic' style="display: inline"> 60s at 08:39 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=519&et=579&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)
|
| 59 |
+
|
| 60 |
+
**spk_2**
|
| 61 |
+
1. [Introduction and Investment Focus <div id='topic' style="display: inline"> 60s at 05:56 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=356&et=416&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)
|
| 62 |
+
2. [Caution in AI Investments <div id='topic' style="display: inline"> 60s at 10:50 </div>](https://rd3.app.roll.ai/collab/9v3b-j426-kxxv_2024-11-19T204924/2024-11-19T223131?st=650&et=710&uid=85146aaa-dfa4-11ee-8665-02aa9bfd29a3)"
|
| 63 |
+
"""
|
| 64 |
+
|
| 65 |
+
collected_message = ""
|
| 66 |
+
chunks = [
|
| 67 |
+
hardcoded_message[i : i + 10] for i in range(0, len(hardcoded_message), 10)
|
| 68 |
+
]
|
| 69 |
+
|
| 70 |
+
import time
|
| 71 |
+
|
| 72 |
+
for chunk in chunks:
|
| 73 |
+
collected_message += chunk
|
| 74 |
+
yield collected_message
|
| 75 |
+
time.sleep(0.05)
|
| 76 |
+
return
|
| 77 |
+
|
| 78 |
try:
|
| 79 |
transcript = transcript_processor.get_transcript()
|
| 80 |
speaker_mapping = transcript_processor.speaker_mapping
|