cahya commited on
Commit
ae187f9
1 Parent(s): 74016c6

udpated the test_dataset

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