Ahmedsh93 commited on
Commit
81bedca
·
verified ·
1 Parent(s): 6f6cd40
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -53,9 +53,12 @@ def extract_audio(video_path, audio_path):
53
 
54
  @st.cache_resource(show_spinner="Loading model...")
55
  def load_model():
 
 
 
56
  classifier = EncoderClassifier.from_hparams(
57
  source=MODEL_ID,
58
- savedir=os.path.join(os.getcwd(), "accent-id-model")
59
  )
60
  return classifier
61
 
 
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,
61
+ savedir=model_path
62
  )
63
  return classifier
64