AI4Bharat / indicTrans

indicTranslate v1 - Machine Translation for 11 Indic languages. For latest v2, check: https://github.com/AI4Bharat/IndicTrans2
https://ai4bharat.iitm.ac.in/indic-trans
MIT License
119 stars 31 forks source link

Issue in using Standalone En2Indic Model #18

Closed kranti-experiments closed 3 years ago

kranti-experiments commented 3 years ago

Hi, If I download the En2Indic Model and try to use it, I am getting the following error:

ModuleNotFoundError: No module named 'inference'

However, if I first download Indic2En Model and then download EN2Indic model things are working fine. Can you please check if it is the same behaviour for you also? or Am I doing something wrong?

Colab Links for your reference:

Working only after Indic2En model https://colab.research.google.com/drive/1HxG1_lvZ7XDD89QbVikajg0HJnQvNrgR?usp=sharing

Not Working if EN2Indic model is downloaded https://colab.research.google.com/drive/1QAQg0557YVgoPLfC7MMtbnfHNNmFpu-m?usp=sharing

gowtham1997 commented 3 years ago

The problem is you are not in indicTrans folder when importing the inference module and that causes the error.

image

^ adding cd indicTrans before your import in the second colab fixes the problem.

The error occurs as you are restarting the runtime after installing fairseq but your current working directory after restarting is not indicTrans folder and hence the import fails

kranti-experiments commented 3 years ago

oh ok, I did add cd indicTrans but after that I have restarted the runtime. I will try again. Thank you