Commit
•
bd892a7
1
Parent(s):
9f29242
Create inference.py
Browse files- inference.py +10 -0
inference.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# inference.py
|
2 |
+
import joblib
|
3 |
+
|
4 |
+
# Load your trained model
|
5 |
+
model = joblib.load("house_price_predictor_model.joblib")
|
6 |
+
|
7 |
+
def predict(data):
|
8 |
+
# Assuming `data` is a list of features needed by your model
|
9 |
+
prediction = model.predict([data])
|
10 |
+
return {'prediction': prediction.tolist()}
|