Spaces:
Runtime error
Runtime error
File size: 1,087 Bytes
0b166ec | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import joblib
import sys
print("Python executable:", sys.executable)
try:
import lightgbm as lgb
print("LightGBM imported successfully!")
except ImportError as e:
print("LightGBM import failed:", e)
sys.exit(1)
try:
model = joblib.load("lightgbm_split2_best_model2 (1).pkl")
print("Model loaded successfully!")
print("Model type:", type(model))
if hasattr(model, "feature_name"):
print("Model features:", model.feature_name())
if hasattr(model, "n_features_in_"):
print("Model n_features_in_:", model.n_features_in_)
if hasattr(model, "classes_"):
print("Model classes:", model.classes_)
except Exception as e:
print("Model load failed:", e)
try:
scaler = joblib.load("robust_scaler (1).pkl")
print("Scaler loaded successfully!")
print("Scaler type:", type(scaler))
if hasattr(scaler, "center_"):
print("Scaler center (medians):", scaler.center_)
if hasattr(scaler, "scale_"):
print("Scaler scale (IQR):", scaler.scale_)
except Exception as e:
print("Scaler load failed:", e)
|