paperless-ngx/src/documents/management/commands/document_create_classifier.py
Trenton H efe779b634 Chore: Cleanup command arguments and standardize process count handling (#4541)
Cleans up some command help text and adds more control over process count for command with a Pool
2023-11-09 11:46:37 -08:00

14 lines
379 B
Python

from django.core.management.base import BaseCommand
from documents.tasks import train_classifier
class Command(BaseCommand):
help = (
"Trains the classifier on your data and saves the resulting models to a "
"file. The document consumer will then automatically use this new model."
)
def handle(self, *args, **options):
train_classifier()