ValueError: dtype='numeric' is not compatible with arrays of bytes/strings.Convert your data to numeric values explicitly instead.
`@app.route('/predict',methods=['GET', 'POST']) def Predict_placement(): ans = request.form.get("msg")
result = model.predict(np.array([ans]).reshape(-1, 1))`
I'm taking a string input in Html form and getting this error, how to resolve this?
您为预测提供的数据位于格式字符串中,但是您的模型只能处理数字数据。在将特征传递给预测之前,您应该尝试对特征进行一些编码。