milestone2 / prediction.py
fazrinmuh's picture
Update prediction.py
9a7b0b9 verified
raw
history blame contribute delete
273 Bytes
import pickle
import pandas as pd
import streamlit
# Load the model is XGB
with open('model.pkl', 'rb') as file:
model = pickle.load(file)
def predict_default(features):
# Predict using the model
prediction = model.predict(features)
return prediction[0]