Skip to main content

A tool for creating and managing labeled datasets for AI training

Project description

AILabel

PyPI version Python Package

A tool for creating and managing labeled datasets for AI training.

Features

  • Create and manage topics (categories for classification)
  • Label text payloads within topics
  • Predict labels for new data using AI (Google Gemini)
  • Fast, Unix-style CLI with streaming and batch processing support

Installation

From PyPI

# Install from PyPI using uv
uv pip install ailabel

# For development, install test dependencies
uv pip install "ailabel[test]"

From Source

# Clone the repository
git clone https://github.com/yourusername/ailabel.git
cd ailabel

# Install the package using uv
uv pip install -e .

# For development, install test dependencies
uv pip install -e ".[test]"

Usage

# Create a new topic
label topics new sentiment

# List all topics
label topics list

# Get information about a topic
label topics info sentiment --labels

# Label a payload
label label "This product is amazing!" --topic=sentiment --as=positive

# Label from stdin
echo "This product is amazing!" | label label - --topic=sentiment --as=positive

# Interactive labeling
label label --topic=sentiment --interactive

# JSON output format
label label "Product was great" --topic=sentiment --as=positive --json

# Predict a label for a new payload
label predict "I love this product" --topic=sentiment

# Predict from stdin and get JSON output
echo "I love this product" | label predict - --topic=sentiment --json

# Process multiple items in batch mode
cat items.txt | label predict - --topic=lang-or-animal --batch

# Show debug information
label --debug

Environment Variables

Create a .env.secret file with the following variables:

GEMINI_API_KEY=your_gemini_api_key

Development

Running Tests

# Run all tests
pytest

# Run tests with coverage
pytest --cov=ailabel

License

MIT

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

ailabel-0.3.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

ailabel-0.3.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file ailabel-0.3.0.tar.gz.

File metadata

  • Download URL: ailabel-0.3.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for ailabel-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4e14e07191a28350c9808d3daf7a82ff66005d7b377e2d411cde24f82fe1fb8a
MD5 8e63351d2ff6a5f7200b046091a18400
BLAKE2b-256 be9080c1d02fa49018c891b26c6536f104ca2651484b74deefaf4ed90e289efe

See more details on using hashes here.

File details

Details for the file ailabel-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ailabel-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for ailabel-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81a69cf900db05f641df063a2db5b89737690daadb7ac4fc63ac8c12cce6b462
MD5 2e9f7c44a7a27e42e3f93055866c283d
BLAKE2b-256 34eed83bad14adb355ac3408c50680e6108b9a539d9b2fe453a18bbde04b2024

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