Update app.py
Browse files
app.py
CHANGED
@@ -473,7 +473,11 @@ def whisper_main():
|
|
473 |
filename = save_and_play_audio(audio_recorder)
|
474 |
if filename is not None:
|
475 |
transcription = transcribe_audio(filename)
|
476 |
-
|
|
|
|
|
|
|
|
|
477 |
st.write(transcription)
|
478 |
response = StreamLLMChatResponse(transcription)
|
479 |
# st.write(response) - redundant with streaming result?
|
|
|
473 |
filename = save_and_play_audio(audio_recorder)
|
474 |
if filename is not None:
|
475 |
transcription = transcribe_audio(filename)
|
476 |
+
try:
|
477 |
+
transcription = transcription['text']
|
478 |
+
except:
|
479 |
+
st.write('Whisper model is asleep. Starting up now on T4 GPU - please give 5 minutes then retry as it scales up from zero to activate running container(s).')
|
480 |
+
|
481 |
st.write(transcription)
|
482 |
response = StreamLLMChatResponse(transcription)
|
483 |
# st.write(response) - redundant with streaming result?
|