Spaces:
Running
Running
updated
#2
by
msahab
- opened
app.py
CHANGED
@@ -53,8 +53,10 @@ def transcribe_and_analyze(audio_input):
|
|
53 |
# Define chatbot to interact with the transcribed text
|
54 |
def chat_with_transcription(history, message, transcription):
|
55 |
"""Add the user message and the transcription to the chat history."""
|
56 |
-
|
57 |
-
|
|
|
|
|
58 |
return history, ""
|
59 |
|
60 |
|
|
|
53 |
# Define chatbot to interact with the transcribed text
|
54 |
def chat_with_transcription(history, message, transcription):
|
55 |
"""Add the user message and the transcription to the chat history."""
|
56 |
+
if message:
|
57 |
+
history.append({"role": "user", "content": message})
|
58 |
+
if transcription:
|
59 |
+
history.append({"role": "assistant", "content": transcription})
|
60 |
return history, ""
|
61 |
|
62 |
|