Created
February 7, 2016 03:18
-
-
Save zeryx/cd466bc8e63ab1d85ec4 to your computer and use it in GitHub Desktop.
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
from sklearn.externals import joblib | |
self.svmStorage = "/tmp/svm/" | |
def onConnect(self, request): | |
print("Client connecting: {0}".format(request.peer)) | |
self.training = True | |
self.svm = joblib.load(self.svmStorage + 'my_model.pkl') | |
def saveSVM(self): | |
print("+ Saving SVM to local directory " + self.svmStorage) | |
joblib.dump(self.svm, self.svmStorage + 'my_model.pkl', compress=9) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment