Update README.md
Browse files
README.md
CHANGED
@@ -103,7 +103,7 @@ test_dataset = test_dataset.map(speech_file_to_array_fn)
|
|
103 |
# Preprocessing the datasets.
|
104 |
# We need to read the aduio files as arrays
|
105 |
def evaluate(batch):
|
106 |
-
|
107 |
|
108 |
with torch.no_grad():
|
109 |
logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
|
|
|
103 |
# Preprocessing the datasets.
|
104 |
# We need to read the aduio files as arrays
|
105 |
def evaluate(batch):
|
106 |
+
inputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
|
107 |
|
108 |
with torch.no_grad():
|
109 |
logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
|