saattrupdan commited on
Commit
19a569a
·
1 Parent(s): 4e86063

fix: Use HUGGINGFACE_HUB_TOKEN when loading pipeline

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -11,6 +11,7 @@ from punctfix import PunctFixer
11
  from transformers import pipeline
12
  from dotenv import load_dotenv
13
  import torch_audiomentations as ta
 
14
 
15
  logging.basicConfig(
16
  level=logging.INFO,
@@ -71,6 +72,7 @@ transcriber = pipeline(
71
  task="automatic-speech-recognition",
72
  model=MODEL_ID,
73
  device=device,
 
74
  )
75
 
76
  logger.info("Loading the punctuation fixer model...")
 
11
  from transformers import pipeline
12
  from dotenv import load_dotenv
13
  import torch_audiomentations as ta
14
+ import os
15
 
16
  logging.basicConfig(
17
  level=logging.INFO,
 
72
  task="automatic-speech-recognition",
73
  model=MODEL_ID,
74
  device=device,
75
+ token=os.getenv("HUGGINGFACE_HUB_TOKEN")
76
  )
77
 
78
  logger.info("Loading the punctuation fixer model...")