Create inference.py
Browse files- inference.py +10 -0
inference.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import catboost
|
2 |
+
from catboost import CatBoostRegressor
|
3 |
+
|
4 |
+
model = CatBoostRegressor()
|
5 |
+
model.load_model("model.cbm")
|
6 |
+
|
7 |
+
def predict(features):
|
8 |
+
# Transform features if necessary
|
9 |
+
prediction = model.predict([features])
|
10 |
+
return prediction.tolist()
|