Spaces:
Sleeping
Sleeping
Update pages/🧠_sickle_cell_chatbot.py
Browse files
pages/🧠_sickle_cell_chatbot.py
CHANGED
|
@@ -90,7 +90,7 @@ class ContextChatbot:
|
|
| 90 |
)
|
| 91 |
chain_type_kwargs = {"prompt": PROMPT}
|
| 92 |
summarizer = ChatOpenAI(model_name= "gpt-4o", temperature=0, streaming=True)
|
| 93 |
-
llm = ChatOpenAI(model_name=
|
| 94 |
|
| 95 |
chat_history = []
|
| 96 |
|
|
@@ -105,7 +105,7 @@ class ContextChatbot:
|
|
| 105 |
return qa
|
| 106 |
|
| 107 |
def transcribe_audio(self, audio_bytes):
|
| 108 |
-
llm = ChatOpenAI(model_name=
|
| 109 |
response = llm.audio.transcriptions.create(
|
| 110 |
model="whisper-1",
|
| 111 |
file=("temp." + "wav", audio_bytes, "audio/wav"),
|
|
|
|
| 90 |
)
|
| 91 |
chain_type_kwargs = {"prompt": PROMPT}
|
| 92 |
summarizer = ChatOpenAI(model_name= "gpt-4o", temperature=0, streaming=True)
|
| 93 |
+
llm = ChatOpenAI(model_name=self.openai_model, temperature=0, streaming=True)
|
| 94 |
|
| 95 |
chat_history = []
|
| 96 |
|
|
|
|
| 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"),
|