fix: properly save model
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user