Created
October 29, 2017 13:43
-
-
Save darcwader/c5c3f69eb2f1c215edd8ced21997b9aa to your computer and use it in GitHub Desktop.
spam
This file contains hidden or 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 coremltools | |
| coreml_model = coremltools.converters.sklearn.convert(spam_detector, "message", "spam_or_not") | |
| #set parameters of the model | |
| coreml_model.short_description = "Classify whether message is spam or not" | |
| coreml_model.input_description["message"] = "TFIDF of message to be classified" | |
| coreml_model.output_description["spam_or_not"] = "Whether message is spam or not" | |
| #save the model | |
| coreml_model.save("SpamMessageClassifier.mlmodel") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment