init commit

This commit is contained in:
2026-07-29 16:50:22 +03:00
commit 0d10a278bf
24 changed files with 3564 additions and 0 deletions

15
lab4/test_model.py Normal file
View File

@@ -0,0 +1,15 @@
import joblib
vectorizer = joblib.load("vectorizer.joblib")
clf = joblib.load("classifier.joblib")
print("Type text to classify. Ctrl+C or empty line to quit.\n")
while True:
text = input("> ").strip()
if not text:
break
X = vectorizer.transform([text])
pred = clf.predict(X)[0]
verdict = "SPAM" if pred == 1 else "HAM"
print(f"[{verdict}] {text}\n")