How to translate a sentence using jupyter notebook?

Hello,

I’m trying to use the onmt library to load a trained OpenNMT-py model in a jupyter notebook and make translations on the go. I want it to be able to do something like this in jupyter:

model = onmt.module.load(/path/to/model.pt)
text = "hola como estas"
model.translate(text)

Output:
Hello how are you

I can’t find any documentation on how to do this. Please help!

Hi,

Did you take a look at this documentation?

http://opennmt.net/OpenNMT-py/Library.html

There is a section for translation.