pgilles commited on
Commit
f9abde7
·
1 Parent(s): 87de8de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -14,7 +14,9 @@ import time
14
  #token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
15
  #model_name = "unilux/wav2vec-xls-r-Luxembourgish20-with-LM"
16
  #model_name = "unilux/wav2vec-xlsr-300m-Luxembourgish-with-LM"
 
17
  model_name = "pgilles/whisper-large-v2-lb_cased_01"
 
18
  #tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(model_name, use_auth_token=token_key)
19
  #model = Wav2Vec2ForCTC.from_pretrained(model_name, use_auth_token=token_key)
20
  #processor = Wav2Vec2ProcessorWithLM.from_pretrained(model_name, use_auth_token=token_key)
@@ -23,9 +25,6 @@ model_name = "pgilles/whisper-large-v2-lb_cased_01"
23
  #model = WhisperModel.from_pretrained(model_name)
24
  #processor = WhisperProcessor.from_pretrained(model_name)
25
 
26
- #device = "cuda" if torch.cuda.is_available() else "cpu"
27
- #model = model.to(device)
28
-
29
  #p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
30
  p = pipeline("automatic-speech-recognition", model=model_name, device=0)
31
 
 
14
  #token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
15
  #model_name = "unilux/wav2vec-xls-r-Luxembourgish20-with-LM"
16
  #model_name = "unilux/wav2vec-xlsr-300m-Luxembourgish-with-LM"
17
+
18
  model_name = "pgilles/whisper-large-v2-lb_cased_01"
19
+
20
  #tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(model_name, use_auth_token=token_key)
21
  #model = Wav2Vec2ForCTC.from_pretrained(model_name, use_auth_token=token_key)
22
  #processor = Wav2Vec2ProcessorWithLM.from_pretrained(model_name, use_auth_token=token_key)
 
25
  #model = WhisperModel.from_pretrained(model_name)
26
  #processor = WhisperProcessor.from_pretrained(model_name)
27
 
 
 
 
28
  #p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
29
  p = pipeline("automatic-speech-recognition", model=model_name, device=0)
30