Skip to main content

A tool for creating and managing labeled datasets for AI training

Project description

AILabel

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
pip install ailabel

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

From Source

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

# Install the package
pip install -e .

# For development, install test dependencies
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.1.0.tar.gz (18.7 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.1.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ailabel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4dd92ceb69c8de59458180dd450df6250676762a009f2aaa9297c4050ebd86db
MD5 f0471112713164984445d367db5c0860
BLAKE2b-256 13e38e62915f22839da69b4e59035ddcd032cf764d7a48101955350d8af046dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ailabel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8642690751e767b953b3e569fb2207b86f4ca14e5518c104190b2e6eef80b276
MD5 22bd4f9d0b73981a9fc711c6664792dc
BLAKE2b-256 f6993861d6695a2b3acb704f7e25c0078abdd1582a183ea50d5ab83006690bb3

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