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); }
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); }