0.0.10 • Published 7 years ago

tensorflow-serving-node-typescript-client v0.0.10

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Tensorflow Serving Client

Targeting Node.js (v6) and TypeScript

Provides:

  • Prediction of images;
  • And that's it so far.

Usage Example

import TensorflowServingClient = require( "tensorflow-serving-node-typescript-client");
import fs = require('fs');

class TensorflowServing {

    private client: any;
    private imagePath: string = "path/to/image.jpg";

    public constructor() {
        this.client = new TensorflowServingClient.TensorflowServingClient("localhost:9000");
    }

    public predict(): void {
        try {
            let buffer = fs.readFileSync(this.imagePath);
            this.client.Predict(buffer)
                .then((result) => {
                    console.log(result);
                })
                .catch((error) => {
                    console.log(error);
                })
        }
        catch (e) {
            console.log(e);
        }
    }
}

export = TensorflowServing;   
Notes
  • This is a work in progress, feel free to improve it.
0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.1

7 years ago