Skip to main content

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')

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tf_serving-0.1.6.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tf_serving-0.1.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file tf_serving-0.1.6.tar.gz.

File metadata

  • Download URL: tf_serving-0.1.6.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for tf_serving-0.1.6.tar.gz
Algorithm Hash digest
SHA256 588e34d61a453d7cafbab9fd49cb40080ceb08e81bd6b819e0b82b131247c507
MD5 00946ebbd1eafbebcfe89227f2df528f
BLAKE2b-256 ed4dbe7d5038bed25545e7a98e6a2437e4696d5f3fdbc29efb5659a344e3665f

See more details on using hashes here.

File details

Details for the file tf_serving-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: tf_serving-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for tf_serving-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad2f2082d6c70f07bf46da5644e4dc83c55b677202fe9fa4ac271d01d0c0277
MD5 634576e720a01b35ba2fbd1a61dea446
BLAKE2b-256 fbceee105d64f4a2f1e30369982b6e737099dea76c3bfb5a215362abe40b4879

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page