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.8.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file nlp2go-0.0.8.tar.gz
.
File metadata
- Download URL: nlp2go-0.0.8.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b316b4f3e81df02aae1743368994f2e4b8afce7029c64af55b98fd6707e7493b |
|
MD5 | 1e7ccdcec1d9513066d9d665582813ab |
|
BLAKE2b-256 | a3c6468ddde41fa72b0ab26731b661a7654b7349b2b7cb9036ad0e4c84e0ccdf |
File details
Details for the file nlp2go-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: nlp2go-0.0.8-py3-none-any.whl
- Upload date:
- Size: 9.0 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 | 0ceeeddd6057445308c6f7dff068697872c386deb60146b932932e94e8287339 |
|
MD5 | 5f865e40e04f6443aa12c60f0e69304b |
|
BLAKE2b-256 | f9ebf29899694e7a4d5219f8b3b4cd55492b69aab5cb9e0de3a1d5b67edd3814 |