cahya commited on
Commit
75c4a61
1 Parent(s): 508f511

updated test_dataset

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -90,7 +90,7 @@ def speech_file_to_array_fn(batch):
90
  return batch
91
 
92
  test_dataset = test_dataset.map(speech_file_to_array_fn)
93
- inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
94
 
95
  with torch.no_grad():
96
  logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
@@ -98,7 +98,7 @@ with torch.no_grad():
98
  predicted_ids = torch.argmax(logits, dim=-1)
99
 
100
  print("Prediction:", processor.batch_decode(predicted_ids))
101
- print("Reference:", test_dataset["sentence"][:2])
102
  ```
103
 
104
 
90
  return batch
91
 
92
  test_dataset = test_dataset.map(speech_file_to_array_fn)
93
+ inputs = processor(test_dataset[:2]["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
94
 
95
  with torch.no_grad():
96
  logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
98
  predicted_ids = torch.argmax(logits, dim=-1)
99
 
100
  print("Prediction:", processor.batch_decode(predicted_ids))
101
+ print("Reference:", test_dataset[:2]["sentence"])
102
  ```
103
 
104