DeployKonduitServing.deploy(
if (handler.succeeded()) {
InferenceDeploymentResult inferenceDeploymentResult = handler.result();
int runningPort = inferenceDeploymentResult.getActualPort();
String deploymentId = inferenceDeploymentResult.getDeploymentId();
System.out.format("%nPort is %s and Deployment Id is %s.%n", runningPort, deploymentId);
String result = Unirest.post(String.format("http://localhost:%s/predict", runningPort))
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.body(new JSONObject().put("input_key", "input_value"))
System.out.format("Result: %s%n", result);
} catch (UnirestException e) {
System.out.println(handler.cause().getMessage());