keras-model-client
Python client API for the Keras Model Server.
Install from PyPI:
pip install keras-model-client
Basic usage:
from keras_model_client import predict
# Using Detectron2 with the default model server
result = predict('/path/to/image.jpg', 'image_queue_detectron2')
# Using YOLOv5 with a custom model server
result = predict('/path/to/image.jpg', 'image_queue_yolov5', url='http://your-model-server/predictor/')
print(result)
# PredictionResult(success=True, predictions=[...])
Note: The default model server is currently hosted at https://adamant.tator.io:8082/.
CLI
The package provides a command-line interface invoked with model-server-predict. For example:
model-server-predict /path/to/image.jpg image_queue_detectron2 -f json
will run the image at /path/to/image.jpg through the Detectron2 model and format the results as JSON. Additional help is available with the -h or --help flag.
Install from source
Clone the repository:
git clone https://github.com/kevinsbarnard/keras-model-client
cd keras-model-client
and install from source with Poetry:
poetry install
or with pip:
pip install .
Metadata
Release files for keras-model-client 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| keras-model-client-0.1.1.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| keras_model_client-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / keras-model-client-0.1.1.tar.gz
| Download URL | keras-model-client-0.1.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a32e0ed6cf02d3633d472f981de976e05429d83af297cb11c691f3e8a2da3596
|
|
BLAKE2b-256 checksum How to use checksums |
aec4a181d9f5752bcb16a458d194a34fcd9fb7fdc5b6ad69412971a4236b7226
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.8.10 Linux/5.13.0-40-generic
|
Release files / keras_model_client-0.1.1-py3-none-any.whl
| Download URL | keras_model_client-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98e7697b434767ac49faacaffa0d4971bb52049dcfba246e276816abfea72308
|
|
BLAKE2b-256 checksum How to use checksums |
8793693600f5baf9feb4508daa1e6608b6a26eafc25cb7e6fdd00590af7ac132
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.8.10 Linux/5.13.0-40-generic
|