Code style changes

This commit is contained in:
Jonas Winkler
2018-09-26 10:51:42 +02:00
parent f7a37b8530
commit b71657964b
5 changed files with 155 additions and 75 deletions

View File

@@ -54,8 +54,9 @@ class Command(Renderable, BaseCommand):
documents = queryset.distinct()
logging.getLogger(__name__).info("Loading classifier")
clf = DocumentClassifier()
try:
clf = DocumentClassifier.load_classifier()
clf.reload()
except FileNotFoundError:
logging.getLogger(__name__).fatal("Cannot classify documents, "
"classifier model file was not "