Skip to main content

Client for CIFAR-10 image classification API

Project description

CIFAR-10 Client

A Python client for interacting with the CIFAR-10 image classification API.

Installation

pip install cifar10-client

Quick Start

from cifar10_client import CIFAR10Client

# Initialize client
client = CIFAR10Client("http://your-api-url:5000")

# Single prediction
result = client.predict_single("path/to/image.jpg")
print(f"Prediction: {result['prediction']} ({result['confidence']}%)")

# Top 3 predictions
result = client.predict_top3("path/to/image.jpg")
for pred, conf in zip(result['predictions'], result['confidences']):
    print(f"{pred}: {conf}%")

# Batch prediction
results = client.predict_batch(["image1.jpg", "image2.jpg"])
for item in results['results']:
    print(f"\nFile: {item['filename']}")
    for pred, conf in zip(item['predictions'], item['confidences']):
        print(f"{pred}: {conf}%")

CLI Usage

# Single prediction
cifar10-predict image.jpg

# Top 3 predictions
cifar10-predict --top3 image.jpg

# Batch prediction
cifar10-predict --batch image1.jpg image2.jpg image3.jpg

Project details


Download files

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

Source Distribution

cifar10_client-0.1.6.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

cifar10_client-0.1.6-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cifar10_client-0.1.6.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cifar10_client-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4070f98f8fa62dbfa623ccf856b551ebd1095871bb58958675b03e586ff5cc04
MD5 bb48b093d0e70aa24c9320e52284ffa5
BLAKE2b-256 d7f82b14dbae7dbb0bc188227ff1e48981a66e5778403361f4260eb0897d282a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cifar10_client-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cifar10_client-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 de06d365d706219e906d7c625ab6d6d81aaf653820b81624a1548d7253dbdb8f
MD5 ed505f8380655f6e5ed52f1b364b1713
BLAKE2b-256 03484afb0a36e72462ad87699f17513d2dd7a7dd83b4856d2f30fe107eb4c38b

See more details on using hashes here.

Supported by

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