Views
No views yet
1from transformers import pipeline
2
3# Load the model
4pii_pipe = pipeline(
5 "token-classification",
6 model="Dombara/pii-detection-model",
7 aggregation_strategy="simple"
8)
9
10# Detect PII
11text = "Contact John Doe at john@example.com or 9876543210"
12results = pii_pipe(text)
13print(results)