Spaces:
Sleeping
Sleeping
File size: 401 Bytes
741c10e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import joblib
import pandas as pd
def load_model(path: str):
"""Load a saved pipeline model from disk."""
return joblib.load(path)
def predict(model, input_df: pd.DataFrame):
"""
Predict class labels and probabilities.
Returns: (labels, probabilities)
"""
labels = model.predict(input_df)
probs = model.predict_proba(input_df)
return labels, probs |