AmirFARES commited on
Commit
39e90d0
·
1 Parent(s): d0dd89e

fix cache permission issue

Browse files
Files changed (1) hide show
  1. src/detector.py +3 -0
src/detector.py CHANGED
@@ -1,5 +1,8 @@
1
  from transformers import pipeline
2
 
 
 
 
3
  asr = pipeline("automatic-speech-recognition", model="openai/whisper-base")
4
 
5
  def detect_accent(audio_path: str):
 
1
  from transformers import pipeline
2
 
3
+ # Use local cache dir to avoid permission issues
4
+ os.environ["TRANSFORMERS_CACHE"] = "./hf_cache"
5
+
6
  asr = pipeline("automatic-speech-recognition", model="openai/whisper-base")
7
 
8
  def detect_accent(audio_path: str):