Instructions to use cp112singh/pii-redactor-openai-filter-draft-27may-c with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cp112singh/pii-redactor-openai-filter-draft-27may-c with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="cp112singh/pii-redactor-openai-filter-draft-27may-c")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("cp112singh/pii-redactor-openai-filter-draft-27may-c") model = AutoModelForTokenClassification.from_pretrained("cp112singh/pii-redactor-openai-filter-draft-27may-c", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload label_config.json with huggingface_hub
Browse files- label_config.json +72 -0
label_config.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"label2id": {
|
| 3 |
+
"O": 0,
|
| 4 |
+
"B-account_number": 1,
|
| 5 |
+
"I-account_number": 2,
|
| 6 |
+
"E-account_number": 3,
|
| 7 |
+
"S-account_number": 4,
|
| 8 |
+
"B-private_address": 5,
|
| 9 |
+
"I-private_address": 6,
|
| 10 |
+
"E-private_address": 7,
|
| 11 |
+
"S-private_address": 8,
|
| 12 |
+
"B-private_date": 9,
|
| 13 |
+
"I-private_date": 10,
|
| 14 |
+
"E-private_date": 11,
|
| 15 |
+
"S-private_date": 12,
|
| 16 |
+
"B-private_email": 13,
|
| 17 |
+
"I-private_email": 14,
|
| 18 |
+
"E-private_email": 15,
|
| 19 |
+
"S-private_email": 16,
|
| 20 |
+
"B-private_person": 17,
|
| 21 |
+
"I-private_person": 18,
|
| 22 |
+
"E-private_person": 19,
|
| 23 |
+
"S-private_person": 20,
|
| 24 |
+
"B-private_phone": 21,
|
| 25 |
+
"I-private_phone": 22,
|
| 26 |
+
"E-private_phone": 23,
|
| 27 |
+
"S-private_phone": 24,
|
| 28 |
+
"B-private_url": 25,
|
| 29 |
+
"I-private_url": 26,
|
| 30 |
+
"E-private_url": 27,
|
| 31 |
+
"S-private_url": 28,
|
| 32 |
+
"B-secret": 29,
|
| 33 |
+
"I-secret": 30,
|
| 34 |
+
"E-secret": 31,
|
| 35 |
+
"S-secret": 32
|
| 36 |
+
},
|
| 37 |
+
"id2label": {
|
| 38 |
+
"0": "O",
|
| 39 |
+
"1": "B-account_number",
|
| 40 |
+
"2": "I-account_number",
|
| 41 |
+
"3": "E-account_number",
|
| 42 |
+
"4": "S-account_number",
|
| 43 |
+
"5": "B-private_address",
|
| 44 |
+
"6": "I-private_address",
|
| 45 |
+
"7": "E-private_address",
|
| 46 |
+
"8": "S-private_address",
|
| 47 |
+
"9": "B-private_date",
|
| 48 |
+
"10": "I-private_date",
|
| 49 |
+
"11": "E-private_date",
|
| 50 |
+
"12": "S-private_date",
|
| 51 |
+
"13": "B-private_email",
|
| 52 |
+
"14": "I-private_email",
|
| 53 |
+
"15": "E-private_email",
|
| 54 |
+
"16": "S-private_email",
|
| 55 |
+
"17": "B-private_person",
|
| 56 |
+
"18": "I-private_person",
|
| 57 |
+
"19": "E-private_person",
|
| 58 |
+
"20": "S-private_person",
|
| 59 |
+
"21": "B-private_phone",
|
| 60 |
+
"22": "I-private_phone",
|
| 61 |
+
"23": "E-private_phone",
|
| 62 |
+
"24": "S-private_phone",
|
| 63 |
+
"25": "B-private_url",
|
| 64 |
+
"26": "I-private_url",
|
| 65 |
+
"27": "E-private_url",
|
| 66 |
+
"28": "S-private_url",
|
| 67 |
+
"29": "B-secret",
|
| 68 |
+
"30": "I-secret",
|
| 69 |
+
"31": "E-secret",
|
| 70 |
+
"32": "S-secret"
|
| 71 |
+
}
|
| 72 |
+
}
|