http://39.97.61.94:5000
GET /health — 返回服务状态。
curl http://39.97.61.94:5000/health
POST /predict — 传入特征数组,返回预测销量。
{
"features": [float1, float2, ..., float23],
"model": "tuned" // 可选,默认 tuned;可选值 "v2" 使用31维模型
}
{
"prediction_raw": 0.42,
"model_used": "tuned"
}
curl -X POST http://39.97.61.94:5000/predict \\\\
-H "Content-Type: application/json" \\\\
-d '{"features": [0.1]*23}'
返回 400 表示请求格式错误,500 表示服务器内部错误。错误信息在 error 字段中。