Commit ·
fee0811
1
Parent(s): 7a03074
Finish
Browse files- model.pkl +3 -0
- model.py +10 -0
- requirements.txt +3 -0
model.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f3285dab16afcc2620f841aa6497613f61014a2f8809033abc631e9af489bbe0
|
| 3 |
+
size 6119
|
model.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import joblib
|
| 2 |
+
import numpy as np
|
| 3 |
+
|
| 4 |
+
model = joblib.load('titanic_model.pkl')
|
| 5 |
+
|
| 6 |
+
# Define inference function
|
| 7 |
+
def predict(features):
|
| 8 |
+
features_array = np.array(features).reshape(1, -1)
|
| 9 |
+
prediction = model.predict(features_array)
|
| 10 |
+
return int(prediction[0])
|
requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
scikit-learn
|
| 2 |
+
joblib
|
| 3 |
+
numpy
|