Files changed (1) hide show
  1. app.py +4 -2
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
- history.append(("User:", message))
57
- history.append(("Transcription:", transcription))
 
 
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