haizad commited on
Commit
dd77ab9
·
1 Parent(s): 4b709ca

Add get started code

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