From 88ae02a5f8a5324a609ff38844122e1909398a4e Mon Sep 17 00:00:00 2001 From: Zian Jiang Date: Sun, 5 Sep 2021 06:28:01 -0400 Subject: [PATCH] Update app.py --- app.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/app.py b/app.py index 51b80c9f..ff01868c 100644 --- a/app.py +++ b/app.py @@ -22,16 +22,6 @@ def predict(): return render_template('index.html', prediction_text='Employee Salary should be $ {}'.format(output)) -@app.route('/predict_api',methods=['POST']) -def predict_api(): - ''' - For direct API calls trought request - ''' - data = request.get_json(force=True) - prediction = model.predict([np.array(list(data.values()))]) - - output = prediction[0] - return jsonify(output) if __name__ == "__main__": - app.run(debug=True) \ No newline at end of file + app.run(debug=True)