Views
No views yet
1from huggingface import load_model_from_hf
2import pandas as pd
3
4model, feature_names, scaler = load_model_from_hf("your-repo-id")
5
6data = pd.DataFrame(...)
7X_scaled = scaler.transform(data[feature_names])
8
9predictions = model.predict(X_scaled)
10probabilities = model.predict_proba(X_scaled)[:, 1]model.pkl: Trained Logistic Regression modelscaler.pkl: StandardScaler for feature normalizationfeature_names.pkl: List of feature names for proper data alignment