I am attempting to port my Django app to a python anywhere environment. This app contains pickled models which have dependencies. According to this stackoverflow post, "pickle doesn't actually store information about how a class/object is constructed, and needs access to the class when unpickling."
The solution given is to simply include the dependencies in the file where main is called. I was doing this on my local server by adding the following line at the top of my
from NewsClassifier.modelTransformers import Cleaner, CountVectorizerWithStemming, SetBias, RemoveNan
However this solution doesn't work in the python anywhere environment as it seems
__main__ is somewhere else. Can I somehow access this
__main__ module? Or alternatively, is there a workaround to this problem?
Hyperlink doesn't seem to be working so heres the URL for the post: