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
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.2.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.2.0-py3-none-any.whl
(12.4 kB
view details)
File details
Details for the file ailabel-0.2.0.tar.gz.
File metadata
- Download URL: ailabel-0.2.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 |
34d4b8a574a362556cacb6923218602871d922d5dfbbe2f1bef9d7f71cddb186
|
|
| MD5 |
9f6d193778eeaf76edb8bf4b2727e96a
|
|
| BLAKE2b-256 |
17df82045fda3293e0471f6b05d38289147d8e4870d518b6ca618bba68c52ef5
|
File details
Details for the file ailabel-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ailabel-0.2.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 |
873c6ffc3dacc6700c6aec964e2a6ed928eeec4f7a51a5b9fd67173e9f69cee8
|
|
| MD5 |
da84a3d0f98c99664224fce3e7117768
|
|
| BLAKE2b-256 |
53e67356d00e31bae1180d531d5927747f91035c6962815c6974ef6e1a28525c
|