cahya commited on
Commit
446c3fd
1 Parent(s): d499300

updated test_dataset

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -55,7 +55,7 @@ def speech_file_to_array_fn(batch):
55
  return batch
56
 
57
  test_dataset = test_dataset.map(speech_file_to_array_fn)
58
- inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
59
 
60
  with torch.no_grad():
61
  logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
@@ -63,7 +63,7 @@ with torch.no_grad():
63
  predicted_ids = torch.argmax(logits, dim=-1)
64
 
65
  print("Prediction:", processor.batch_decode(predicted_ids))
66
- print("Reference:", test_dataset["sentence"][:2])
67
  ```
68
 
69
 
 
55
  return batch
56
 
57
  test_dataset = test_dataset.map(speech_file_to_array_fn)
58
+ inputs = processor(test_dataset[:2]["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
59
 
60
  with torch.no_grad():
61
  logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
 
63
  predicted_ids = torch.argmax(logits, dim=-1)
64
 
65
  print("Prediction:", processor.batch_decode(predicted_ids))
66
+ print("Reference:", test_dataset[:2]["sentence"])
67
  ```
68
 
69