Loading ml.py +6 −0 Original line number Diff line number Diff line Loading @@ -290,6 +290,12 @@ def partialFitNewData(message, label): print(np.subtract(after, before)) return 'Models updated successfully' def topFive(): features = load('features.joblib') return features[:5] def switchCurrentAlgorithm(): pass Loading server.py +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ def getTopAlgorithms(): # TODO make this get the actual top feature words @app.route('/getWords', methods=["GET"]) def getTopFiveWords(): word = ["Larry", "Schultheis", "Larry", "Schultheis", "Larry"] word = ml.topFive() val = { "words": word Loading Loading
ml.py +6 −0 Original line number Diff line number Diff line Loading @@ -290,6 +290,12 @@ def partialFitNewData(message, label): print(np.subtract(after, before)) return 'Models updated successfully' def topFive(): features = load('features.joblib') return features[:5] def switchCurrentAlgorithm(): pass Loading
server.py +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ def getTopAlgorithms(): # TODO make this get the actual top feature words @app.route('/getWords', methods=["GET"]) def getTopFiveWords(): word = ["Larry", "Schultheis", "Larry", "Schultheis", "Larry"] word = ml.topFive() val = { "words": word Loading