Update README.md
Browse files
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 |
-
|
286 |
predicted_ids = nllb_model.generate(
|
287 |
-
inputs_embeds=
|
288 |
-
attention_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 |
)
|