SI2020/Sklearn/injectCode.py

15 lines
356 B
Python
Raw Normal View History

2020-05-13 03:14:09 +02:00
import pickle
import sys
def prediction(warzywo, nawoz ,srodek, stan_wzrostu):
filename = 'decisionTree.sav'
tree = pickle.load(open(filename, 'rb'))
print(tree.predict([[warzywo, nawoz, srodek, stan_wzrostu]]))
if __name__ == '__main__':
# Map command line arguments to function arguments.
prediction(*sys.argv[1:])