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.5.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file nlp2go-0.0.5.tar.gz
.
File metadata
- Download URL: nlp2go-0.0.5.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 448a0957f8b3d977ddc3aafdc8608cfd17a66a9e1758c826351bcd31a76c2786 |
|
MD5 | f84eb8d2c2bf8e970a8be9eb346db460 |
|
BLAKE2b-256 | dab6cc597f6807b2183ce0590e671a471332fcb2d02272e5a32d0df638744ff2 |
File details
Details for the file nlp2go-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: nlp2go-0.0.5-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 005bae593e52c2192d46e387884a1fa5d1698ef2738a9ebffc23c8d6af6b8b55 |
|
MD5 | 0cbf884ce9bec5cc474e33f0d9b3838d |
|
BLAKE2b-256 | 16326e96505836e1d25da0d2736dd6ea4f7c9dcc2500a074ebb3b330752cd5c6 |