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 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
uvx --no-cache --from . label -t school math
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.4.0.tar.gz
(14.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ailabel-0.4.0-py3-none-any.whl
(12.4 kB
view details)
File details
Details for the file ailabel-0.4.0.tar.gz.
File metadata
- Download URL: ailabel-0.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aae7c962dda69bd22a8d452dc18f58ddc4aaab955e1e1023e920a8dc5f184257
|
|
| MD5 |
5062e7947095a20fba69334c2cfe488f
|
|
| BLAKE2b-256 |
1f063cbe9784d725b10fd473ea118235e0ae704596d21982c40ece03ea6299de
|
File details
Details for the file ailabel-0.4.0-py3-none-any.whl.
File metadata
- Download URL: ailabel-0.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54472f90590eace3c123387372fca11d760810745f06fc985adc3a73673d3862
|
|
| MD5 |
33e8c9988ced88777c7165adcc0964f9
|
|
| BLAKE2b-256 |
ae7b57eacebbab96a7b2a617df8304391387f7b2676508a96050d21a24f51930
|