Zero-Shot Classification
GLiNER2
Safetensors
English
Russian
extractor
safety
pii
ai-security
zero-shot
text-classification
span-categorization
token-classification
guardrails
Instructions to use hivetrace/gliner-guard-uniencoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use hivetrace/gliner-guard-uniencoder with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("hivetrace/gliner-guard-uniencoder") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -36,7 +36,6 @@ Classify Harmful messages and Detect PII via single forward pass
|
|
| 36 |
from gliner2 import GLiNER2
|
| 37 |
|
| 38 |
model = GLiNER2.from_pretrained("raft-security-lab/gliner-guard-uniencoder")
|
| 39 |
-
model.compile()
|
| 40 |
|
| 41 |
PII_LABELS = ["person", "address", "email", "phone"]
|
| 42 |
SAFETY_LABELS = ["safe", "unsafe"]
|
|
|
|
| 36 |
from gliner2 import GLiNER2
|
| 37 |
|
| 38 |
model = GLiNER2.from_pretrained("raft-security-lab/gliner-guard-uniencoder")
|
|
|
|
| 39 |
|
| 40 |
PII_LABELS = ["person", "address", "email", "phone"]
|
| 41 |
SAFETY_LABELS = ["safe", "unsafe"]
|