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
- create a json file as below:
{
"API1_PATH": {
"model": "model1_path",
"predictor": "predictor_tag"
},
"API2_PATH": {
"model": "model2_path",
"predictor": "predictor_tag"
}
}
- 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
Release history Release notifications | RSS feed
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.18.tar.gz
(4.7 kB
view details)
Built Distributions
nlp2go-0.0.18-py3.7.egg
(17.8 kB
view details)
File details
Details for the file nlp2go-0.0.18.tar.gz
.
File metadata
- Download URL: nlp2go-0.0.18.tar.gz
- Upload date:
- Size: 4.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f13a81170e27df5a881f35fc6bc481f57583b3da0fb1844f91376abde5b1511 |
|
MD5 | 107d931baae983e5d10770bf757c0158 |
|
BLAKE2b-256 | 629284222577e7d822b27ad204831b069af2e4b3b3ccda8fb592e29b1d358b5a |
File details
Details for the file nlp2go-0.0.18-py3.7.egg
.
File metadata
- Download URL: nlp2go-0.0.18-py3.7.egg
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a79e884166562f7d52bb287bf963217c130e89996b01b6713a038d64978af6a9 |
|
MD5 | 01487311b7eff8c0cc83913f0b5e77e8 |
|
BLAKE2b-256 | 7780b11034f8824c555c770f1b3997bdd0d81f7a56e4239c81daca7093f2b2b9 |
File details
Details for the file nlp2go-0.0.18-py3-none-any.whl
.
File metadata
- Download URL: nlp2go-0.0.18-py3-none-any.whl
- Upload date:
- Size: 9.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.45.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bb9dfe3f06047a3bcdc1447feff9f7feabca8b002b06195abefc30c917b3790 |
|
MD5 | 953da70bfd91a25c147c50c2db417e1a |
|
BLAKE2b-256 | f81915ff4429ad388e05a68033203412a8f746dbfdb00a39d7fa98e215d546db |