rahular commited on
Commit
93bef3b
1 Parent(s): 3c051dd

Update shuka_pipeline.py

Browse files
Files changed (1) hide show
  1. shuka_pipeline.py +3 -8
shuka_pipeline.py CHANGED
@@ -33,14 +33,9 @@ class ShukaPipeline(transformers.Pipeline):
33
  )
34
 
35
  if audio_processor is None:
36
- try:
37
- audio_processor = transformers.AutoProcessor.from_pretrained(
38
- model.config.audio_model_id or model.config.audio_config._name_or_path
39
- )
40
- except:
41
- audio_processor = transformers.AutoProcessor.from_pretrained(
42
- "openai/whisper-large-v2"
43
- )
44
 
45
  self.processor = ShukaProcessor(
46
  audio_processor=audio_processor,
 
33
  )
34
 
35
  if audio_processor is None:
36
+ audio_processor = transformers.AutoProcessor.from_pretrained(
37
+ model.config.audio_model_id or model.config.audio_config._name_or_path
38
+ )
 
 
 
 
 
39
 
40
  self.processor = ShukaProcessor(
41
  audio_processor=audio_processor,