tomer9080 commited on
Commit
2faff30
·
1 Parent(s): 7071f90

hf_token update

Browse files
Files changed (1) hide show
  1. whisper_stream/__init__.py +2 -1
whisper_stream/__init__.py CHANGED
@@ -311,9 +311,10 @@ def load_streaming_model_correct(
311
  subname = (str(gran) + '-multi') if multilingual else str(gran)
312
 
313
  from huggingface_hub import hf_hub_download
 
314
 
315
  try:
316
- ckpt_path = hf_hub_download(repo_id="MLSpeech/causal-whisper", filename=_STREAMING_MODELS_HF[name][subname], repo_type="model", token=True)
317
  except KeyError as e:
318
  print(f"Streaming model with the next configs: size {name}, multilingual: {multilingual} and chunk size: {gran} is not available.")
319
 
 
311
  subname = (str(gran) + '-multi') if multilingual else str(gran)
312
 
313
  from huggingface_hub import hf_hub_download
314
+ hf_token = os.environ.get("HF_TOKEN")
315
 
316
  try:
317
+ ckpt_path = hf_hub_download(repo_id="MLSpeech/causal-whisper", filename=_STREAMING_MODELS_HF[name][subname], repo_type="model", token=hf_token)
318
  except KeyError as e:
319
  print(f"Streaming model with the next configs: size {name}, multilingual: {multilingual} and chunk size: {gran} is not available.")
320