Update README.md
Browse files
README.md
CHANGED
|
@@ -50,11 +50,12 @@ Our models can be used with `AutoModel` and `AutoConfig` classes to extract feat
|
|
| 50 |
|
| 51 |
```python
|
| 52 |
import soundfile as sf
|
| 53 |
-
import torch
|
| 54 |
from transformers import AutoProcessor, AutoModel
|
| 55 |
|
| 56 |
# load model
|
| 57 |
model_name = "PantagrueLLM/speech-base-14K"
|
|
|
|
| 58 |
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
|
| 59 |
model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
|
| 60 |
model.eval()
|
|
|
|
| 50 |
|
| 51 |
```python
|
| 52 |
import soundfile as sf
|
| 53 |
+
import torch
|
| 54 |
from transformers import AutoProcessor, AutoModel
|
| 55 |
|
| 56 |
# load model
|
| 57 |
model_name = "PantagrueLLM/speech-base-14K"
|
| 58 |
+
# Note: please normalize the audio if not using AutoProcessor
|
| 59 |
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
|
| 60 |
model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
|
| 61 |
model.eval()
|