Spaces:
Runtime error
Runtime error
Commit
Β·
2c95641
1
Parent(s):
d5f86c3
Update app.py
Browse files
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= "
|
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="
|
21 |
|
22 |
#Instantiating the transformer class' pipeline object.
|
23 |
|
24 |
pipe = pipeline(task="automatic-speech-recognition",
|
25 |
-
model="
|
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,
|