Write predict_endpoint(request). If "amount" is missing, return
{"error": "missing amount"}. Otherwise compute score = amount * 0.01
and return {"prediction": "fraud" if score > 0.5 else "legit", "score": round(score, 2)}.
Write predict_endpoint(request). If "amount" is missing, return
{"error": "missing amount"}. Otherwise compute score = amount * 0.01
and return {"prediction": "fraud" if score > 0.5 else "legit", "score": round(score, 2)}.