awacke1 commited on
Commit
7453974
1 Parent(s): 354eba0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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
- transcription = transcription['text']
 
 
 
 
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?