Last active
November 22, 2020 08:52
-
-
Save ngmars/36c2d9a5c346c5f4f8caac6f45d9f747 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import joblib | |
clf.fit(y_train, X_train) | |
weight = 'new_model.sav' | |
joblib.dump(clf, weight) | |
#define a function and pass your parameters | |
def predict(A,B,C): | |
arr=[A,B,C] | |
y_test=[arr] | |
y_test=np.asarray(y_test) | |
X_pred_prob = loaded_model.predict_proba(y_test) | |
prediction= loaded_binarizer.inverse_transform(X_pred_new) | |
print(prediction) | |
#make sure you return the vaule, this would help you create the API | |
return([A,B,C],prediction) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment