0

why i got a keyword error on this server script?

i'm already made my inference engine script python (python inference engine script) into a server

after that i'm make a new script that combine that answer with my inference script just like these :

from sklearn import tree
from flask import Flask

app = Flask(__name__)

    
@app.route('/'. methods=['GET','POST'])
def index(input):
    input = [[1,1,2,3,3,1,1,2]]
    
    data = pd.read_csv('datawadek.csv')
    y = data.KELAS
    x = data.drop('KELAS', axis = 1)

    cart = tree.DecisionTreeClassifier()

    cart = cart.fit(x,y)

    return cart.predict(input)

if __name__ == '__main__':
    app.run(debug=True)

instead i got the result i want i only got the error keyword can't be an expression at line 6 when i running on cmd.

if there any sugess or solution please let me know.

Community
  • 1
  • 1

0 Answers0