son9john commited on
Commit
8e4b3a8
·
1 Parent(s): 078b7ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -127,10 +127,10 @@ def transcribe(audio, text):
127
  # Add the input text to the messages list
128
  messages_rev.insert(0, {"role": "user", "content": subinput_text + transcript["text"]})
129
 
130
- chat_transcript = f"\n\nNumber of tokens used: {num_tokens}\n\n"
131
 
132
- # Concatenate the chat history
133
- chat_transcript += "\n\n".join([f"[ANSWER {answer_count}]{message['role']}: {message['content']}" for message in messages_rev if message['role'] != 'user'])
134
  # if not isinstance(messages[-1]['content'], str):
135
  # continue
136
 
 
127
  # Add the input text to the messages list
128
  messages_rev.insert(0, {"role": "user", "content": subinput_text + transcript["text"]})
129
 
130
+ chat_transcript = f"\n\nNumber of tokens used: {num_tokens}\n\n"
131
 
132
+ # Concatenate the chat history
133
+ chat_transcript += "\n\n".join([f"[ANSWER {answer_count}]{message['role']}: {message['content']}" for message in messages_rev if message['role'] != 'user'])
134
  # if not isinstance(messages[-1]['content'], str):
135
  # continue
136