rafaaa2105 commited on
Commit
92ea310
·
verified ·
1 Parent(s): afb301f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -9,6 +9,7 @@ from transformers.pipelines.audio_utils import ffmpeg_read
9
  import tempfile
10
  import os
11
 
 
12
  MODEL_NAME = "nyrahealth/CrisperWhisper"
13
  BATCH_SIZE = 8
14
  FILE_LIMIT_MB = 1000
@@ -19,6 +20,7 @@ device = 0 if torch.cuda.is_available() else "cpu"
19
  pipe = pipeline(
20
  task="automatic-speech-recognition",
21
  model=MODEL_NAME,
 
22
  chunk_length_s=30,
23
  device=device,
24
  )
 
9
  import tempfile
10
  import os
11
 
12
+ hf_token = os.getenv('HF_TOKEN')
13
  MODEL_NAME = "nyrahealth/CrisperWhisper"
14
  BATCH_SIZE = 8
15
  FILE_LIMIT_MB = 1000
 
20
  pipe = pipeline(
21
  task="automatic-speech-recognition",
22
  model=MODEL_NAME,
23
+ token=hf_token,
24
  chunk_length_s=30,
25
  device=device,
26
  )