sharad461/nepali-translator

AttributeError: 'Namespace' object has to attribute 'max_sentences'

Closed this issue · 1 comments

AttributeError arising from this line specifically:

gen = interactive.Generator("app/ne_en_bpe2000", "app/models/ne_en.pt")

The error looks like this on flask server.

I am getting no such error. The problem might be in your installation of fairseq. My setup using fairseq-0.9.0 portalocker-2.0.0 sacrebleu-1.4.14 sacremoses-0.0.43 sentencepiece-0.1.91 is running well. Make sure you have downloaded the .pt model files and have everything in place. Also make sure you run the script from the translator folder and not app folder.

If nothing else works, you can find the object itself and try supplying a max_sentences attribute: object.max_sentences = None. If you are confused regarding the directory structure, you can post yours here and I can see if anything is wrong.