AshDavid12 commited on
Commit
a22cb12
·
1 Parent(s): 340928b

trying to build docker image -model load prob

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. Dockerfile +8 -0
  3. whisper_online.py +1 -1
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .env
Dockerfile CHANGED
@@ -19,6 +19,14 @@ RUN python3 -m pip install --upgrade pip
19
  COPY requirements.txt .
20
  RUN pip install -r requirements.txt
21
 
 
 
 
 
 
 
 
 
22
  # Install the specific model using faster-whisper
23
  RUN python3 -c 'import faster_whisper; m = faster_whisper.WhisperModel("ivrit-ai/faster-whisper-v2-d3-e3")'
24
 
 
19
  COPY requirements.txt .
20
  RUN pip install -r requirements.txt
21
 
22
+ # Set build arguments for Hugging Face username and API token
23
+ ARG HUGGINGFACE_USERNAME
24
+ ARG HUGGINGFACE_API_TOKEN
25
+
26
+ # Set environment variables
27
+ ENV HUGGINGFACE_USERNAME=${HUGGINGFACE_USERNAME}
28
+ ENV HUGGINGFACE_API_TOKEN=${HUGGINGFACE_API_TOKEN}
29
+
30
  # Install the specific model using faster-whisper
31
  RUN python3 -c 'import faster_whisper; m = faster_whisper.WhisperModel("ivrit-ai/faster-whisper-v2-d3-e3")'
32
 
whisper_online.py CHANGED
@@ -34,7 +34,7 @@ class ASRBase:
34
 
35
  # "" for faster-whisper because it emits the spaces when neeeded)
36
 
37
- def __init__(self, lan, modelsize=None, cache_dir=None, model_dir=None, logfile=sys.stderr):
38
  self.logfile = logfile
39
 
40
  self.transcribe_kargs = {}
 
34
 
35
  # "" for faster-whisper because it emits the spaces when neeeded)
36
 
37
+ def __init__(self, lan, modelsize=None, cache_dir="/tmp", model_dir=None, logfile=sys.stderr):
38
  self.logfile = logfile
39
 
40
  self.transcribe_kargs = {}