Spaces:
Sleeping
Sleeping
File size: 963 Bytes
1e9199a | 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 | import joblib
import pandas as pd
from pathlib import Path
assets_path = Path("backend/model_assets")
try:
model = joblib.load(assets_path / "model.joblib")
scaler = joblib.load(assets_path / "scaler.joblib")
print("--- Model Information ---")
if hasattr(model, "feature_names_in_"):
print(f"Features expected by Model: {len(model.feature_names_in_)}")
print(model.feature_names_in_[:10])
print("\n--- Scaler Information ---")
if hasattr(scaler, "feature_names_in_"):
print(f"Features expected by Scaler: {len(scaler.feature_names_in_)}")
# print(scaler.feature_names_in_[:10])
if (assets_path / "selected_features.joblib").exists():
selected = joblib.load(assets_path / "selected_features.joblib")
print(f"\nSaved selected_features count: {len(selected)}")
else:
print("\nselected_features.joblib NOT FOUND")
except Exception as e:
print(f"Error: {e}")
|