alexey-ernest / tensorflow-serving-node-client

Node gRPC client for TensorFlow Serving server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tensorflow-serving-node-client

Node gRPC client for TensorFlow Serving server

const fs = require('fs');
const client = require('tensorflow-serving-node-client')('localhost:9000');

const IMAGE_PATH = './cat.jpg';
const buffer = fs.readFileSync(IMAGE_PATH);

client.predict(buffer, (err, res) => {
  if (err) {
    return console.error(err);
  }

  console.log(res);
});

About

Node gRPC client for TensorFlow Serving server

License:MIT License


Languages

Language:JavaScript 100.0%