I have made a time predictor with python and sklearn. I would like to capture the data ("humidity" and "wind") using an html form (use of input), then check them in python and finally return the response in the html file (the data on whether it is raining or not). I had thought about doing it by writing a text document and having it read by python, but I do not know how that could be done. Next, the python code, how could you implement it in html?
from sklearn import tree
clf = tree.DecisionTreeClassifier()
# Weather informartion. [ humidity , wind]
def weatherprediction (humidity,wind)
X = [[88 , 125 ] ,[23,15] ,[79,200] , [44,45],[68,111],[35,30] ,[22,10],[38,10],[39,150] , [97,20]]
Y = ['Rain','Dont rain','Rain','Rain','Rain','Dont rain','Dont rain','Dont rain','Dont rain','Rain']
clf = clf.fit(X,Y) #The program learn how the informantion is related
prediction = clf.predict([[humidity,wind]])
print(prediction)