import xgboost as xgb from preprocessing import preprocess_input model = xgb.XGBClassifier() model.load_model("model/xgb_model.json") def predict_risk(input_dict): df = preprocess_input(input_dict) score = model.predict_proba(df)[0][1] return round(score, 2)