psakamoori
commited on
Commit
•
606f39a
1
Parent(s):
99adc0f
Update README.md
Browse files
README.md
CHANGED
@@ -85,14 +85,16 @@ pip install "transformers>=4.30.0"
|
|
85 |
To run inference using the OpenVINO backend, you can use a sample application. Below is an example script (app.py) demonstrating how to set up and run the model inference:
|
86 |
|
87 |
```
|
88 |
-
|
89 |
-
ov_opts = {"
|
|
|
90 |
|
91 |
instance = CustomEncoderWav2vec2Classifier(modules=checkpoint.mods,
|
92 |
hparams=hparams_dict, model=classifier.mods["wav2vec2"].model,
|
93 |
audio_file_path="speechbrain/emotion-recognition-wav2vec2-IEMOCAP/anger.wav",
|
94 |
backend="openvino",
|
95 |
-
|
|
|
96 |
save_ov_model=False)
|
97 |
```
|
98 |
|
|
|
85 |
To run inference using the OpenVINO backend, you can use a sample application. Below is an example script (app.py) demonstrating how to set up and run the model inference:
|
86 |
|
87 |
```
|
88 |
+
config = {hints.performance_mode: hints.PerformanceMode.THROUGHPUT}
|
89 |
+
ov_opts = {"ov_device": "CPU", "config": config}
|
90 |
+
torch_device = "cpu"
|
91 |
|
92 |
instance = CustomEncoderWav2vec2Classifier(modules=checkpoint.mods,
|
93 |
hparams=hparams_dict, model=classifier.mods["wav2vec2"].model,
|
94 |
audio_file_path="speechbrain/emotion-recognition-wav2vec2-IEMOCAP/anger.wav",
|
95 |
backend="openvino",
|
96 |
+
opts=ov_opts,
|
97 |
+
torch_device=torch_device,
|
98 |
save_ov_model=False)
|
99 |
```
|
100 |
|