1import joblib
2import numpy as np
3from huggingface_hub import hf_hub_download
4
5# Download model
6model_path = hf_hub_download(
7 repo_id="srivardhan/california-housing-price-prediction",
8 filename="california_housing_model.joblib"
9)
10model = joblib.load(model_path)
11
12# Predict - input features: [MedInc, HouseAge, AveRooms, AveBedrms, Population, AveOccup, Latitude, Longitude]
13sample = np.array([[8.3252, 41.0, 6.984127, 1.023810, 322.0, 2.555556, 37.88, -122.23]])
14prediction = model.predict(sample)
15print(f"Predicted house value: ${prediction[0] * 100000:,.0f}")
This model repository was generated by
ML Intern, an agent for machine learning research and development on the Hugging Face Hub.