Ahmedsh93 commited on
Commit
0d4d906
·
verified ·
1 Parent(s): 81bedca
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -53,8 +53,10 @@ def extract_audio(video_path, audio_path):
53
 
54
  @st.cache_resource(show_spinner="Loading model...")
55
  def load_model():
56
- # Use a directory that has write permissions
57
- model_path = os.path.join("/data", "accent-id-model")
 
 
58
 
59
  classifier = EncoderClassifier.from_hparams(
60
  source=MODEL_ID,
 
53
 
54
  @st.cache_resource(show_spinner="Loading model...")
55
  def load_model():
56
+ model_path = "/data/accent-id-model"
57
+
58
+ # ✅ Ensure the /data directory exists and is writable
59
+ os.makedirs(model_path, exist_ok=True)
60
 
61
  classifier = EncoderClassifier.from_hparams(
62
  source=MODEL_ID,