From 4eeb8d2d1713eba8d07a88172eba9320062359f3 Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Sat, 24 Dec 2022 12:29:00 -0800 Subject: [PATCH] Use GPTC v4.0.0 --- compile.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/compile.py b/compile.py index a2e72cb..82ef6e0 100755 --- a/compile.py +++ b/compile.py @@ -32,13 +32,11 @@ raw_model = [ ] with open("model.gptc", "w+b") as f: - f.write( - gptc.compile( - raw_model, - max_ngram_length=config["max_ngram_length"], - min_count=config["min_count"], - ).serialize() - ) + gptc.compile( + raw_model, + max_ngram_length=config["max_ngram_length"], + min_count=config["min_count"], + ).serialize(f) con.commit() con.close()