fix: properly save model

This commit is contained in:
2026-07-30 17:48:30 +03:00
parent 0d10a278bf
commit 2ae6193b03

View File

@@ -65,11 +65,10 @@ def main():
for text, label, score in zip(samples, preds, scores_demo):
verdict = "SPAM" if label == 1 else "HAM"
print(f"[{verdict}] score={score:.2f} :: {text}")
if __name__ == "__main__":
# persist our model
joblib.dump(vectorizer, "vectorizer.joblib")
joblib.dump(clf, "classifier.joblib")
if __name__ == "__main__":
print("\nSaved model artifacts.")
main()