Skip to main content

hosting nlp models for demo purpose

Project description

nlp2go - hosting nlp models for demo purpose

Example

hosting single model

nlp2go --model model_path --predictor biotag

hosting multiple models

  1. create a json file as below:
{
    "API1_PATH": {
      "model": "model1_path",
      "predictor": "predictor_tag"
    },
    "API2_PATH": {
      "model": "model2_path",
      "predictor": "predictor_tag"
    }
}
  1. run
nlp2go --json json_file_path  

Installation

Installing via pip

pip install nlp2go

Running nlprep

Once you've installed nlprep, you can run with

python -m nlp2go.server # local version
or
nlp2go # pip installed version

and the following parameter:

$ nlp2go
arguments:
  --model       model path 
  or   
  --json        json file include models setting 

  --outdir      processed result output directory       

optional arguments:
  -h, --help    show this help message and exit
  --predictor   formatting result on different kind of task    ['biotag', 'tag', 'default']  
  --path        api path
  --port        api hosting port
  --cli         command line mode

Json file example

{
    "API1_PATH": {
      "model": "model1_path",
      "predictor": "predictor_tag"
    },
    "API2_PATH": {
      "model": "model2_path",
      "predictor": "predictor_tag"
    }
}

Expose application over the web

I recommend using ngrok to expose this api for demo purpose
Ngrok: https://ngrok.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nlp2go-0.0.6.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

nlp2go-0.0.6-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file nlp2go-0.0.6.tar.gz.

File metadata

  • Download URL: nlp2go-0.0.6.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for nlp2go-0.0.6.tar.gz
Algorithm Hash digest
SHA256 e81b12c4f9100455bf323d4eedb552d71159def68b7f172f4dbdb4c21fbd7f37
MD5 b109bc1cdeae70ef075c94b98d530bed
BLAKE2b-256 488cdf930de441e5ef77c9f9cd26c5e76ee8ca8affd421b8d78a9d30427c213f

See more details on using hashes here.

File details

Details for the file nlp2go-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: nlp2go-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for nlp2go-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2cf0e462f94d5f18d994724862aa2c9165573976713f2d7b9a531ee00a9eb5d7
MD5 a91f4f8a8c3f38721fb8777cc50d3408
BLAKE2b-256 9558d38444b1739234a0bd139b61a57569a5f3281e4cd0f3c88bc9a96f74fec0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page