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