From 3340abbf15a645066416117b995d893aa0c0e13e Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Wed, 23 Nov 2022 17:47:27 -0800 Subject: [PATCH] Fix CLI tool --- gptc/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gptc/__main__.py b/gptc/__main__.py index 26769cb..d98d4bd 100644 --- a/gptc/__main__.py +++ b/gptc/__main__.py @@ -72,8 +72,8 @@ def main() -> None: ).serialize() ) elif args.subparser_name == "classify": - with open(args.model, "r") as f: - model = json.load(f) + with open(args.model, "rb") as f: + model = gptc.deserialize(f.read()) classifier = gptc.Classifier(model, args.max_ngram_length)