yahya007's picture
Upload 5 files
1f56d0d verified
raw
history blame
446 Bytes
# utils.py (Helper Functions)
import joblib
def load_model():
"""
Loads the trained model from file.
"""
model = joblib.load("models/clf_svm.joblib")
return model
def model_predict(features):
"""
Predicts using the loaded model.
"""
model = load_model()
prediction = model.predict([features]) # Fixed: Changed email to features
# prediction = 1 if prediction == 1 else -1
return prediction