コード例 #1
0
        public PredictionResponse GetPredictionResponse(RequestToPredict requestBody)
        {
            var client  = new RestClient(kerasUrl);
            var request = new RestRequest(Method.POST)
            {
                RequestFormat = DataFormat.Json
            };

            request.AddJsonBody(requestBody);
            return(client.Execute <PredictionResponse>(request).Data);
        }
コード例 #2
0
        public PredictionResponse PredictionRequestModel(RequestToPredict request)
        {
            PredictionResponse result = _client.PostAsync <PredictionResponse>($"http://ec2-54-208-76-120.compute-1.amazonaws.com:8080/predict", request).Result.Result;

            return(result);
        }