/tensorflow-serving-client4j

Tensorflow serving java client

Primary LanguageC++Apache License 2.0Apache-2.0

tensorflow-serving-client4j

Copy Protobuf IDL from

Dependencies

Install

mvn protobuf:compile
mvn package

Usage

final String host = "127.0.0.1";
final int port = 8500;
ManagedChannel channel = ManagedChannelBuilder.forAddress(host, port).usePlaintext().build();
PredictionServiceGrpc.PredictionServiceBlockingStub blockingStub = PredictionServiceGrpc.newBlockingStub(channel);
        
PredictRequest request = genRequest();
@SuppressWarnings("unused")
PredictResponse response = blockingStub.predict(request);