TaahKay commited on
Commit
0d27cea
·
verified ·
1 Parent(s): 450a1f3

Update app.py

Browse files

add spinner for load model

Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -21,9 +21,11 @@ initialize_session_state()
21
 
22
  # Load models once
23
  if 'classifier' not in st.session_state:
24
- st.session_state.classifier = load_accent_model()
 
25
  if 'whisper' not in st.session_state:
26
- st.session_state.whisper = load_whisper()
 
27
 
28
  # Memory info
29
  display_memory_once()
 
21
 
22
  # Load models once
23
  if 'classifier' not in st.session_state:
24
+ with st.spinner(Loading SpeechBrain model..."):
25
+ st.session_state.classifier = load_accent_model()
26
  if 'whisper' not in st.session_state:
27
+ with st.spinner(Loading Whisper model..."):
28
+ st.session_state.whisper = load_whisper()
29
 
30
  # Memory info
31
  display_memory_once()