Update README.md
Browse files
README.md
CHANGED
|
@@ -31,9 +31,16 @@ pip install -U optimum[exporters,onnxruntime] transformers
|
|
| 31 |
pip install huggingface_hub
|
| 32 |
|
| 33 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
|
| 35 |
from transformers import WhisperTokenizerFast, WhisperFeatureExtractor, pipeline
|
| 36 |
|
|
|
|
| 37 |
model_name = 'mohammed/quantized-whisper-small' # folder name
|
| 38 |
model = ORTModelForSpeechSeq2Seq.from_pretrained(model_name, export=False)
|
| 39 |
tokenizer = WhisperTokenizerFast.from_pretrained(model_name)
|
|
|
|
| 31 |
pip install huggingface_hub
|
| 32 |
|
| 33 |
```python
|
| 34 |
+
|
| 35 |
+
# uncomment the following installation if you are using a notebook:
|
| 36 |
+
#!pip install -U optimum[exporters,onnxruntime] transformers
|
| 37 |
+
#!pip install huggingface_hub
|
| 38 |
+
|
| 39 |
+
# import the required packages
|
| 40 |
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
|
| 41 |
from transformers import WhisperTokenizerFast, WhisperFeatureExtractor, pipeline
|
| 42 |
|
| 43 |
+
# set model name/id
|
| 44 |
model_name = 'mohammed/quantized-whisper-small' # folder name
|
| 45 |
model = ORTModelForSpeechSeq2Seq.from_pretrained(model_name, export=False)
|
| 46 |
tokenizer = WhisperTokenizerFast.from_pretrained(model_name)
|