@lewtun What you suggested seems to work. Although this has to be set before
from transformers import MarianMTModel, MarianTokenizer if I want to use os package to set environmental variables.
Other than it doesn’t follow PEP8, models seem to be loading okay.