sharmavaruncs commited on
Commit
1729c17
·
1 Parent(s): 2bf7ca7

Hypter link button added

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -378,14 +378,12 @@ def process_file(ser_model,tokenizer,gpt_model,gpt_tokenizer):
378
  try:
379
 
380
  audio_array, sr = librosa.load(preprocessWavFile(temp_filename), sr=None)
381
- st.sidebar.markdown("<p style='font-size: 14px; font-weight: bold;'>Generating transcriptions! Please wait...</p>", unsafe_allow_html=True)
382
-
383
- transcription = speechtoText(temp_filename)
384
-
385
- emo = predict(audio_array,ser_model,2,tokenizer,transcription)
386
-
387
- # Display the transcription in a textbox
388
- st.sidebar.text_area("Transcription", transcription, height=25)
389
  except:
390
  st.write("Inference impossible, a problem occurred with your audio or your parameters, we apologize :(")
391
 
 
378
  try:
379
 
380
  audio_array, sr = librosa.load(preprocessWavFile(temp_filename), sr=None)
381
+ #st.sidebar.markdown("<p style='font-size: 14px; font-weight: bold;'>Generating transcriptions! Please wait...</p>", unsafe_allow_html=True)
382
+ with st.spinner(st.markdown("<p style='font-size: 14px; font-weight: bold;'>Generating transcriptions in the side pane! Please wait...</p>", unsafe_allow_html=True)):
383
+ transcription = speechtoText(temp_filename)
384
+ emo = predict(audio_array,ser_model,2,tokenizer,transcription)
385
+ # Display the transcription in a textbox
386
+ st.sidebar.text_area("Transcription", transcription, height=25)
 
 
387
  except:
388
  st.write("Inference impossible, a problem occurred with your audio or your parameters, we apologize :(")
389