# inference.py import joblib import numpy as np # Load your model (no scaler) model = joblib.load('classification_model.joblib') def predict(input_features): # Make sure the input is a 2D array (batch_size, num_features) input_array = np.array(input_features).reshape(1, -1) prediction = model.predict(input_array) return prediction.tolist() # Return the prediction as a list for easy JSON handling