sharmavaruncs commited on
Commit
e35ca6f
·
1 Parent(s): 571080e

made spinner message simpler

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -420,7 +420,8 @@ def process_file(ser_model,tokenizer,gpt_model,gpt_tokenizer):
420
 
421
  try:
422
  audio_array, sr = librosa.load(preprocessWavFile(temp_filename), sr=None)
423
- with st.spinner(st.markdown("<p style='font-size: 16px; font-weight: bold;'>Generating transcriptions in the side pane! Please wait...</p>", unsafe_allow_html=True)):
 
424
  transcription = speechtoText(temp_filename)
425
  emo = predict(audio_array,ser_model,2,tokenizer,transcription)
426
  # Display the transcription in a textbox
@@ -435,7 +436,8 @@ def process_file(ser_model,tokenizer,gpt_model,gpt_tokenizer):
435
  # Store the value of emo in the session state
436
  st.session_state.emo = emo
437
  if st.button(button_label1):
438
- with st.spinner(st.markdown("<p style='font-size: 16px; font-weight: bold;'>Generating tips (it may take upto 2-3 mins). Please wait...</p>", unsafe_allow_html=True)):
 
439
  # Retrieve prompt from the emotion
440
  emo = st.session_state.emo
441
  # Call the function for GENAI
 
420
 
421
  try:
422
  audio_array, sr = librosa.load(preprocessWavFile(temp_filename), sr=None)
423
+ #with st.spinner(st.markdown("<p style='font-size: 16px; font-weight: bold;'>Generating transcriptions in the side pane! Please wait...</p>", unsafe_allow_html=True)):
424
+ with st.spinner("Generating transcriptions in the side pane! Please wait..."):
425
  transcription = speechtoText(temp_filename)
426
  emo = predict(audio_array,ser_model,2,tokenizer,transcription)
427
  # Display the transcription in a textbox
 
436
  # Store the value of emo in the session state
437
  st.session_state.emo = emo
438
  if st.button(button_label1):
439
+ #with st.spinner(st.markdown("<p style='font-size: 16px; font-weight: bold;'>Generating tips (it may take upto 2-3 mins). Please wait...</p>", unsafe_allow_html=True)):
440
+ with st.spinner("Generating transcriptions in the side pane! Please wait..."):
441
  # Retrieve prompt from the emotion
442
  emo = st.session_state.emo
443
  # Call the function for GENAI