Update shuka_pipeline.py
Browse files- 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 |
-
|
37 |
-
|
38 |
-
|
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,
|