Fix CLI tool

This commit is contained in:
Samuel Sloniker 2022-11-23 17:47:27 -08:00
parent a10569b5ab
commit 3340abbf15
Signed by: kj7rrv
GPG Key ID: 1BB4029E66285A62

View File

@ -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)