Add get started code
Browse files
README.md
CHANGED
@@ -177,7 +177,19 @@ This model is not ready to be used in production.
|
|
177 |
|
178 |
# How to Get Started with the Model
|
179 |
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
# Model Card Authors
|
183 |
|
|
|
177 |
|
178 |
# How to Get Started with the Model
|
179 |
|
180 |
+
Use the following code to get started:
|
181 |
+
|
182 |
+
```python
|
183 |
+
import joblib
|
184 |
+
from skops.hub_utils import download
|
185 |
+
import json
|
186 |
+
import pandas as pd
|
187 |
+
download(repo_id="haizad/ames-housing-lasso-predictor", dst='ames-housing-lasso-predictor')
|
188 |
+
pipeline = joblib.load( "ames-housing-lasso-predictor/model.pkl")
|
189 |
+
with open("ames-housing-lasso-predictor/config.json") as f:
|
190 |
+
config = json.load(f)
|
191 |
+
pipeline.predict(pd.DataFrame.from_dict(config["sklearn"]["example_input"]))
|
192 |
+
```
|
193 |
|
194 |
# Model Card Authors
|
195 |
|