Spaces:
Sleeping
Sleeping
Update pages/🧠_sickle_cell_chatbot.py
Browse files
pages/🧠_sickle_cell_chatbot.py
CHANGED
|
@@ -105,7 +105,8 @@ class ContextChatbot:
|
|
| 105 |
return qa
|
| 106 |
|
| 107 |
def transcribe_audio(self, audio_bytes):
|
| 108 |
-
|
|
|
|
| 109 |
model="whisper-1",
|
| 110 |
file=("temp." + "wav", audio_bytes, "audio/wav"),
|
| 111 |
)
|
|
|
|
| 105 |
return qa
|
| 106 |
|
| 107 |
def transcribe_audio(self, audio_bytes):
|
| 108 |
+
llm = ChatOpenAI(model_name=_self.openai_model, temperature=0, streaming=True)
|
| 109 |
+
response = llm.audio.transcriptions.create(
|
| 110 |
model="whisper-1",
|
| 111 |
file=("temp." + "wav", audio_bytes, "audio/wav"),
|
| 112 |
)
|