Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ def process_audio(audio_input):
|
|
68 |
st.markdown(response.choices[0].message.content)
|
69 |
|
70 |
def process_audio_for_video(video_input):
|
71 |
-
if
|
72 |
transcription = client.audio.transcriptions.create(
|
73 |
model="whisper-1",
|
74 |
file=video_input,
|
@@ -77,7 +77,7 @@ def process_audio_for_video(video_input):
|
|
77 |
model=MODEL,
|
78 |
messages=[
|
79 |
{"role": "system", "content":"""You are generating a transcript summary. Create a summary of the provided transcription. Respond in Markdown."""},
|
80 |
-
{"role": "user", "content": [{"type": "text", "text": f"The audio transcription is: {transcription
|
81 |
],
|
82 |
temperature=0,
|
83 |
)
|
|
|
68 |
st.markdown(response.choices[0].message.content)
|
69 |
|
70 |
def process_audio_for_video(video_input):
|
71 |
+
if video_input:
|
72 |
transcription = client.audio.transcriptions.create(
|
73 |
model="whisper-1",
|
74 |
file=video_input,
|
|
|
77 |
model=MODEL,
|
78 |
messages=[
|
79 |
{"role": "system", "content":"""You are generating a transcript summary. Create a summary of the provided transcription. Respond in Markdown."""},
|
80 |
+
{"role": "user", "content": [{"type": "text", "text": f"The audio transcription is: {transcription}"}],}
|
81 |
],
|
82 |
temperature=0,
|
83 |
)
|