diff --git a/benchmark.py b/benchmark.py index 08ea53a..b9cea9f 100644 --- a/benchmark.py +++ b/benchmark.py @@ -33,7 +33,9 @@ print( ) -classifier = gptc.Classifier(gptc.compile(raw_model, max_ngram_length), max_ngram_length) +classifier = gptc.Classifier( + gptc.compile(raw_model, max_ngram_length), max_ngram_length +) print( "Average classification time over", classify_iterations, diff --git a/gptc/__main__.py b/gptc/__main__.py index 2e01389..560ba4c 100644 --- a/gptc/__main__.py +++ b/gptc/__main__.py @@ -6,19 +6,34 @@ import json import sys import gptc + def main(): parser = argparse.ArgumentParser( description="General Purpose Text Classifier", prog="gptc" ) subparsers = parser.add_subparsers(dest="subparser_name", required=True) - compile_parser = subparsers.add_parser("compile", help="compile a raw model") + compile_parser = subparsers.add_parser( + "compile", help="compile a raw model" + ) compile_parser.add_argument("model", help="raw model to compile") - compile_parser.add_argument("--max-ngram-length", "-n", help="maximum ngram length", type=int, default=1) + compile_parser.add_argument( + "--max-ngram-length", + "-n", + help="maximum ngram length", + type=int, + default=1, + ) classify_parser = subparsers.add_parser("classify", help="classify text") classify_parser.add_argument("model", help="compiled model to use") - classify_parser.add_argument("--max-ngram-length", "-n", help="maximum ngram length", type=int, default=1) + classify_parser.add_argument( + "--max-ngram-length", + "-n", + help="maximum ngram length", + type=int, + default=1, + ) group = classify_parser.add_mutually_exclusive_group() group.add_argument( "-j",