pgilles commited on
Commit
f153441
Β·
1 Parent(s): d7d1406

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -10,10 +10,14 @@ import time
10
  #Loading the model and the tokenizer
11
  token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
12
 
13
- model_name = "pgilles/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
- p = pipeline("automatic-speech-recognition", model=model_name, device=0, use_auth_token=token_key)
 
 
 
 
17
 
18
  def load_data(input_file):
19
 
 
10
  #Loading the model and the tokenizer
11
  token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
12
 
13
+ model_name = "pgilles/Wav2Vec2-large-xlsr-1b-LUXEMBOURGISH33-with-LM"
14
 
15
+ tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(model_name, use_auth_token=token_key)
16
+ model = Wav2Vec2ForCTC.from_pretrained(model_name, use_auth_token=token_key)
17
+ processor = Wav2Vec2ProcessorWithLM.from_pretrained(model_name, use_auth_token=token_key)
18
+
19
+
20
+ p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
21
 
22
  def load_data(input_file):
23