import pandas as pd from sklearn.linear_model import LinearRegression from joblib import dump # Load historical AMC data data = pd.read_csv("training_data.csv") X = data[["last_service_days"]] y = data["next_service_days"] # Train the model model = LinearRegression().fit(X, y) # Save the model to a file dump(model, "amc_model.pkl")