title: Use NLLB Machine Translation with Pytorch
body: <p>I've managed to save a model for automatic translation with pytorch and I'm wondering how can I use it to translate input sentences.</p>
  <p>I came across an article suggesting to use a class_mapping so I guess that I should use the dictionary available on that github page  as python list <a href="https://github.com/facebookresearch/fairseq/tree/nllb" rel="nofollow noreferrer">https://github.com/facebookresearch/fairseq/tree/nllb</a></p>
  <p><a href="https://i.stack.imgur.com/FHZWl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FHZWl.png" alt="enter image description here" /></a></p>
  <p>I used this line of code to load the model :</p>
  <pre><code>model = torch.load(PATH)
  model.eval()
  </code></pre>
  <p>So my question is how can I use the model and the dictionary in order to &quot;predict&quot; the translation of a sentence ?</p>
  <p>Thank you</p>