README / README.md
codelion's picture
Update README.md
99d67bf verified
|
raw
history blame
1.31 kB
---
title: README
emoji: πŸ“š
colorFrom: blue
colorTo: purple
sdk: static
pinned: false
license: apache-2.0
---
# Adaptive Classifier
A flexible, adaptive classification system that allows for dynamic addition of new classes and continuous learning from examples. Built on top of transformers from HuggingFace, this library provides an easy-to-use interface for creating and updating text classifiers.
## Usage
```python
pip install adaptive-classifier
from adaptive_classifier import AdaptiveClassifier
# Load from Hub
classifier = AdaptiveClassifier.from_pretrained("adaptive-classifier/model-name")
# Add some examples
texts = [
"The product works great!",
"Terrible experience",
"Neutral about this purchase"
]
labels = ["positive", "negative", "neutral"]
classifier.add_examples(texts, labels)
# Make predictions
predictions = classifier.predict("This is amazing!")
print(predictions) # [('positive', 0.85), ('neutral', 0.12), ('negative', 0.03)]
```
## How It Works
The system combines three key components:
1. **Transformer Embeddings**: Uses state-of-the-art language models for text representation
2. **Prototype Memory**: Maintains class prototypes for quick adaptation to new examples
3. **Adaptive Neural Layer**: Learns refined decision boundaries through continuous training