johntsi commited on
Commit
9452e17
1 Parent(s): 2d18c76

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -282,10 +282,10 @@ assert sr == 16000, "Input of wav2vec2.0 is expected to have sampling rate of 16
282
  input_values = processor(audio, sampling_rate=16000, return_tensors="pt").cuda()
283
 
284
  # translation to German
285
- emb, mask = zeroswot_encoder(**input_values)
286
  predicted_ids = nllb_model.generate(
287
- inputs_embeds=emb,
288
- attention_mask=~mask,
289
  forced_bos_token_id=tokenizer.lang_code_to_id["deu_Latn"],
290
  num_beams=5,
291
  )
 
282
  input_values = processor(audio, sampling_rate=16000, return_tensors="pt").cuda()
283
 
284
  # translation to German
285
+ compressed_embeds, attention_mask = zeroswot_encoder(**input_values)
286
  predicted_ids = nllb_model.generate(
287
+ inputs_embeds=compressed_embeds,
288
+ attention_mask=attention_mask,
289
  forced_bos_token_id=tokenizer.lang_code_to_id["deu_Latn"],
290
  num_beams=5,
291
  )