cigol123 commited on
Commit
4360654
·
verified ·
1 Parent(s): c89739f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -4,6 +4,11 @@ from transformers import WhisperProcessor, WhisperForConditionalGeneration
4
  import soundfile as sf
5
  import numpy as np
6
  from scipy import signal
 
 
 
 
 
7
 
8
  # Load the Whisper model and processor directly from Hugging Face
9
  def load_model():
 
4
  import soundfile as sf
5
  import numpy as np
6
  from scipy import signal
7
+ import os
8
+
9
+ # Set the cache directory to a writable location
10
+ os.environ["TRANSFORMERS_CACHE"] = "/tmp/.cache"
11
+ os.environ["HF_DATASETS_CACHE"] = "/tmp/.cache"
12
 
13
  # Load the Whisper model and processor directly from Hugging Face
14
  def load_model():