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

Uploaded Source

Built Distributions

nlp2go-0.0.16-py3.7.egg (11.0 kB view details)

Uploaded Source

nlp2go-0.0.16-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nlp2go-0.0.16.tar.gz
  • Upload date:
  • Size: 4.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.36.1 CPython/3.7.4

File hashes

Hashes for nlp2go-0.0.16.tar.gz
Algorithm Hash digest
SHA256 ad21e2a5c6220d2f8df3dc39972ca97b0b997d319ae03c6f53807ab224477d50
MD5 f87e8f8d30d2570b51a67f552c83ada5
BLAKE2b-256 964b40e3c08504b6efe5a7dbb56c866fbaf3b1b51e2eeba0f87ba532d6fd9efd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlp2go-0.0.16-py3.7.egg
  • Upload date:
  • Size: 11.0 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.16-py3.7.egg
Algorithm Hash digest
SHA256 3a790009875a1226c9a9e64c25fd15231928eb5f91bf14b1570dd75c0d5d4c19
MD5 896b3d999160af0d8d44ffdc3173023d
BLAKE2b-256 2e8a529f3d595d653071ac3d7cf3a631d22bd8b18c82c28a6fcb7f32d8f244f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlp2go-0.0.16-py3-none-any.whl
  • Upload date:
  • Size: 9.5 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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 3141f46a678c90abac5747b8638caabe12aef4f26afbb996231e7d2efe967ceb
MD5 ce3cfcbc0aef3240f922de34ae333e18
BLAKE2b-256 08265f60cea08d2eda4652bc6160482853ca144bd09f9a9f367cf26baf3bd023

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