botarioAcc commited on
Commit
bae72eb
·
verified ·
1 Parent(s): e37b837

add token authentification

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import time
 
2
 
3
  import torch
4
  import gradio as gr
@@ -19,7 +20,6 @@ if LANGUAGE not in SUPPORTED_LANGUAGES:
19
  else:
20
  MODEL_PATH = MODEL_PATHS[LANGUAGE]
21
 
22
-
23
  wave2vec_pipeline = pipeline(
24
  "automatic-speech-recognition",
25
  model=MODEL_PATH,
@@ -27,6 +27,7 @@ wave2vec_pipeline = pipeline(
27
  chunk_length_s=30,
28
  stride_length_s=(4, 2),
29
  batch_size=8,
 
30
  )
31
 
32
 
 
1
  import time
2
+ import os
3
 
4
  import torch
5
  import gradio as gr
 
20
  else:
21
  MODEL_PATH = MODEL_PATHS[LANGUAGE]
22
 
 
23
  wave2vec_pipeline = pipeline(
24
  "automatic-speech-recognition",
25
  model=MODEL_PATH,
 
27
  chunk_length_s=30,
28
  stride_length_s=(4, 2),
29
  batch_size=8,
30
+ use_auth_token=os.getenv("HF_TOKEN"),
31
  )
32
 
33