leophill commited on
Commit
ed5d9a3
·
1 Parent(s): 432caa2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -10,13 +10,12 @@ import time
10
  #Loading the model and the tokenizer
11
  token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
12
 
13
- model_name = "unilux/whisper-large-v2-lb_cased_01"
14
 
15
  #p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
16
- #pipe = pipeline("automatic-speech-recognition", model=model_name, lang="Luxembourgish", device=0, use_auth_token=token_key)
17
- pipe = pipeline("automatic-speech-recognition", model=model_name, device=0, use_auth_token=token_key)
18
 
19
- pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(task="transcribe")
 
20
 
21
  def load_data(input_file):
22
 
 
10
  #Loading the model and the tokenizer
11
  token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
12
 
13
+ model_name = "unilux/whisper-large-v2-lb_cased_02"
14
 
15
  #p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
 
 
16
 
17
+ pipe = pipeline("automatic-speech-recognition", model=model_name, device=0, use_auth_token=token_key)
18
+ pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language= "Luxembourgish", task="transcribe")
19
 
20
  def load_data(input_file):
21