leophill commited on
Commit
d4fa0b1
·
1 Parent(s): cfd2660

Update app.py

Browse files

updated use_auth_token option

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -10,13 +10,14 @@ import time
10
 
11
  #Loading the model and the tokenizer
12
  token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
 
13
 
14
  model_name = "pgilles/whisper-large-v2-lb_cased_04"
15
  #model_name = "pgilles/whisper-large-10_Chamber" # model too bad
16
 
17
  #p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
18
 
19
- pipe = pipeline("automatic-speech-recognition", model=model_name, device=0, use_auth_token=token_key)
20
  #pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language= "Luxembourgish", task="transcribe")
21
  #pipe.model.config.forced_decoder_ids = None
22
 
 
10
 
11
  #Loading the model and the tokenizer
12
  token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
13
+ print("key length:", len(token_key.strip()))
14
 
15
  model_name = "pgilles/whisper-large-v2-lb_cased_04"
16
  #model_name = "pgilles/whisper-large-10_Chamber" # model too bad
17
 
18
  #p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
19
 
20
+ pipe = pipeline("automatic-speech-recognition", model=model_name, device=0, use_auth_token=True)
21
  #pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language= "Luxembourgish", task="transcribe")
22
  #pipe.model.config.forced_decoder_ids = None
23