Instructions to use sarvamai/shuka-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sarvamai/shuka-1 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sarvamai/shuka-1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
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,
|