TaahKay commited on
Commit
450a1f3
·
verified ·
1 Parent(s): 6f1c718

Update models/model_loader.py

Browse files
Files changed (1) hide show
  1. models/model_loader.py +2 -2
models/model_loader.py CHANGED
@@ -7,7 +7,7 @@ from faster_whisper import WhisperModel
7
  # -------------------------------
8
  # Load Model (Cached)
9
  # -------------------------------
10
- @st.cache_resource(show_spinner="Loading model...") # making sure we only load the model once per every app instance
11
  def load_accent_model():
12
  """Loads custom accent classification model."""
13
  if not os.getenv("HF_TOKEN"):
@@ -23,6 +23,6 @@ def load_accent_model():
23
  st.error(f"❌ Error loading model: {e}")
24
  st.stop()
25
 
26
- @st.cache_resource(show_spinner="Loading Whisper...")
27
  def load_whisper():
28
  return WhisperModel("tiny", device="cpu", compute_type="int8_float32")
 
7
  # -------------------------------
8
  # Load Model (Cached)
9
  # -------------------------------
10
+
11
  def load_accent_model():
12
  """Loads custom accent classification model."""
13
  if not os.getenv("HF_TOKEN"):
 
23
  st.error(f"❌ Error loading model: {e}")
24
  st.stop()
25
 
26
+
27
  def load_whisper():
28
  return WhisperModel("tiny", device="cpu", compute_type="int8_float32")