@tangramdotdev/tangram
    TypeScript icon, indicating that this package has built-in type declarations

    0.7.1 • Public • Published

    Tangram for JavaScript

    The Tangram JavaScript package makes it easy to make predictions with your Tangram machine learning model from JavaScript.

    Setup

    Node.js

    $ npm install @tangramdotdev/tangram
    
    let tangram = require("@tangramdotdev/tangram")

    Deno

    import tangram from "https://js.tangram.dev/deno"

    Bundler

    If you are using a bundler that supports WebAssembly modules such as Webpack >= 4, you can use the package from npm.

    $ npm install @tangramdotdev/tangram
    
    import tangram from "@tangramdotdev/tangram"

    Browser

    If you are targeting a modern browser with support for ES Modules, WebAssembly, and top-level await, you can import the tangram library from https://js.tangram.dev.

    import tangram from "https://js.tangram.dev"

    Usage

    let model = new tangram.Model("./heart_disease.tangram")
    
    let input = {
    	age: 63,
    	gender: "male",
    	// ...
    }
    
    let output = model.predict(input)

    For more information, read the docs.

    Examples

    The source for this package contains a number of examples in the examples directory. Each example has a README.md explaining how to run it.

    Keywords

    none

    Install

    npm i @tangramdotdev/tangram

    DownloadsWeekly Downloads

    3

    Version

    0.7.1

    License

    MIT

    Unpacked Size

    13.2 MB

    Total Files

    59

    Last publish

    Collaborators

    • nitsky