micknikolic commited on
Commit
2c95641
Β·
1 Parent(s): d5f86c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,7 +9,7 @@ from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
9
 
10
  #Instantiating the model object.
11
 
12
- model = AutoModelForSpeechSeq2Seq.from_pretrained(pretrained_model_name_or_path= "distil-whisper/distil-large-v2",
13
  torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
14
  use_safetensors=True)
15
 
@@ -17,12 +17,12 @@ model = model.to("cuda")
17
 
18
  #Instantiating the processor object.
19
 
20
- processor = AutoProcessor.from_pretrained(pretrained_model_name_or_path="distil-whisper/distil-large-v2")
21
 
22
  #Instantiating the transformer class' pipeline object.
23
 
24
  pipe = pipeline(task="automatic-speech-recognition",
25
- model="distil-whisper/distil-large-v2",
26
  tokenizer=processor.tokenizer,
27
  feature_extractor=processor.feature_extractor,
28
  max_new_tokens=128,
 
9
 
10
  #Instantiating the model object.
11
 
12
+ model = AutoModelForSpeechSeq2Seq.from_pretrained(pretrained_model_name_or_path= "openai/whisper-large-v3",
13
  torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
14
  use_safetensors=True)
15
 
 
17
 
18
  #Instantiating the processor object.
19
 
20
+ processor = AutoProcessor.from_pretrained(pretrained_model_name_or_path="openai/whisper-large-v3")
21
 
22
  #Instantiating the transformer class' pipeline object.
23
 
24
  pipe = pipeline(task="automatic-speech-recognition",
25
+ model="openai/whisper-large-v3",
26
  tokenizer=processor.tokenizer,
27
  feature_extractor=processor.feature_extractor,
28
  max_new_tokens=128,