I have a django app that needs to access methods from a class that was previously trained on some data.
To put things into context, the django app needs to access a classifier for classifying text. The classifier is trained on an initial data set and then I need to call it to classify new input, without re-training it. Therefore, I need one classifier instance to be alive all the time, independently of sessions, etc and to be able to call it to classify new text.
I was looking into Celery, but I have never used it. What is the best way to achieve such functionality? Any pointers to the right direction are much appreciated.
EDIT: To re-define my question. What's the best solution for having a specific object (the classifier), that needs to maintain its state (initial training), accessible from all the views in django? Is it a good practice to train the classifier at server start-up and save it as a variable which is accessible from a global static method?