TechInterMezzo
commited on
Commit
·
1609f1f
1
Parent(s):
37f94c5
Update README.md
Browse files
README.md
CHANGED
@@ -10,6 +10,7 @@ feature_extractor = WhisperFeatureExtractor.from_pretrained("techintermezzo/whis
|
|
10 |
model = WhisperEncoder.from_pretrained("techintermezzo/whisper-encoder-medium").half()
|
11 |
model.eval()
|
12 |
|
13 |
-
|
14 |
-
|
|
|
15 |
```
|
|
|
10 |
model = WhisperEncoder.from_pretrained("techintermezzo/whisper-encoder-medium").half()
|
11 |
model.eval()
|
12 |
|
13 |
+
with torch.inference_mode():
|
14 |
+
input_features = feature_extractor(inputs, sampling_rate=16000, return_tensors="pt").input_features
|
15 |
+
last_hidden_state = model(input_features).last_hidden_state
|
16 |
```
|