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.17.tar.gz (4.6 kB view details)

Uploaded Source

Built Distributions

nlp2go-0.0.17-py3.7.egg (11.3 kB view details)

Uploaded Source

nlp2go-0.0.17-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nlp2go-0.0.17.tar.gz
  • Upload date:
  • Size: 4.6 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.45.0 CPython/3.7.4

File hashes

Hashes for nlp2go-0.0.17.tar.gz
Algorithm Hash digest
SHA256 0bcdef170d13174b60bea79b7e7f0b7bc87cb58ed234cc7209ec12a883a167a1
MD5 337b5935ee4a0d943d1e68952e271f08
BLAKE2b-256 b4d85a1ee0f9e75858b6fda23599b4d0be26f666be2c8d27d9dbbb29c670c457

See more details on using hashes here.

File details

Details for the file nlp2go-0.0.17-py3.7.egg.

File metadata

  • Download URL: nlp2go-0.0.17-py3.7.egg
  • Upload date:
  • Size: 11.3 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.45.0 CPython/3.7.4

File hashes

Hashes for nlp2go-0.0.17-py3.7.egg
Algorithm Hash digest
SHA256 f10aba977bda1766d59a84be69eb57491ddf843c5a4bff0f691ca8e5a29425d3
MD5 0214e7a809b217ef324cf4288ba55ff8
BLAKE2b-256 ed4030002469a21cfdb77c41bd375ce9d9b9760d4ae517df982ba25175aaa62b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlp2go-0.0.17-py3-none-any.whl
  • Upload date:
  • Size: 9.8 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.45.0 CPython/3.7.4

File hashes

Hashes for nlp2go-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 6d46d9a463ae2e838063a67312253ee4416af45f514b24bce95ddfbe88496fd5
MD5 f5a87df909dca262c86cdabf8763f9de
BLAKE2b-256 b42d16af6ed245a0f7e323e1ed0891aefb91a3132f2ffe2a89f42c95eb62ed77

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