@adncorp/parse-server-ml-adapter
AD
Last updated 7 months ago by thirdparty .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @adncorp/parse-server-ml-adapter 
SYNC missed versions from official npm registry.

BeConnect Sync Adapter

JavaScript Style Guide

Get started

Parse server adapter for ML based on some Cloud ML provider like Microsoft, Google and Amazon

Usage

1- first create a cognitive Service Account the link with the instructions : https://docs.microsoft.com/fr-fr/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows

2- Install and configure the adapter on you parse-server app

$npm install --save  @adncorp/parse-server-ml-adapter
const ParseServerMlAdapter = require('@adncorp/parse-server-ml-adapter').default;
// or if you are using es6
import ParseServerMlAdapte from  '@adncorp/parse-server-ml-adapter';

// register 
const providersConfigs = {
    microsoft: {
        subscriptionKey: "COMPUTER_VISION_SUBSCRIPTION_KEY",
        endpoint: "COMPUTER_VISION_ENDPOINT"
    },
    tesseract: {
        key: process.env.TES_KEY,
        endpoint: process.env.TES_ENDPOINT
    },
    tabscanner:{
        apikey:process.env.TABSCANNER_APIKEY,
        endpoint: process.env.TABSCANNER_ENDPOINT
    }
};

const parseServerMlAdapter = new ParseServerMlAdapter(providersConfigs);

var parseApi = new ParseServer({
    ...
    machineLearningAdapter = parseServerMlAdapter
});

// you can you it with you express app as usual

3- To test you can ocr recognition from Microsoft computer vision ocr service

curl --request POST \
  --url http://localhost:1337/parse/predict/microsoft \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-parse-application-id: myappid' \
  --header 'x-parse-rest-api-key: restapiKey' \
  --data '{"service": "ocr","data":{"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Atomist_quote_from_Democritus.png/338px-Atomist_quote_from_Democritus.png","params": {"language": "unk","detectOrientation": true}}}'

the result should be

{text : 'NOTHING\nEXISTS\nEXCEPT\nATOMS\nAND EMPTY\nSPACE.\nEverything else\nis opinion.'}

Requirement

  • node >= 10.x

Developer

  • install deps
npm install
  • run unit tests
npm run coverage

Command line

npm build 
node bin/parse-server-ml-adapter --help

Current Tags

  • 1.4.0                                ...           latest (7 months ago)

6 Versions

  • 1.4.0                                ...           7 months ago
  • 1.3.0                                ...           7 months ago
  • 1.1.1                                ...           7 months ago
  • 1.1.0                                ...           7 months ago
  • 1.0.2                                ...           7 months ago
  • 1.0.0                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 6
Last Month 19
Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |