TensorFlow Serving Client
Client for OCR predictions against TensorFlow Serving
pip install tf-serving
Model
The served model must return the following schema:
{
preds: StringTensor[BATCH x TOP_PATHS],
logprobs: FloatTensor[BATCH x TOP_PATHS]
}
Usage
from tf.serving import predict, encode64
with open('path/to/image.jpg', 'rb') as f:
img = encode64(f.read())
await predict([img], host='http://localhost', port=8501, endpoint='/v1/models/ocr:predict')
# Right(value=[ImagePreds(preds=['Place', 'Piace', ...], logprobs=[-0.187645972, -2.03857613, ...])], tag='right')
Metadata
Release files for tf-serving 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tf_serving-0.1.6.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tf_serving-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / tf_serving-0.1.6.tar.gz
| Download URL | tf_serving-0.1.6.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
588e34d61a453d7cafbab9fd49cb40080ceb08e81bd6b819e0b82b131247c507
|
|
BLAKE2b-256 checksum How to use checksums |
ed4dbe7d5038bed25545e7a98e6a2437e4696d5f3fdbc29efb5659a344e3665f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.9
|
Release files / tf_serving-0.1.6-py3-none-any.whl
| Download URL | tf_serving-0.1.6-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ad2f2082d6c70f07bf46da5644e4dc83c55b677202fe9fa4ac271d01d0c0277
|
|
BLAKE2b-256 checksum How to use checksums |
fbceee105d64f4a2f1e30369982b6e737099dea76c3bfb5a215362abe40b4879
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.9
|