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
Download label_config.json from cp112singh/pii-redactor-openai-filter-draft-27may-c: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/cp112singh/pii-redactor-openai-filter-draft-27may-c/resolve/main/label_config.json
- Command line
-
hf download hf://cp112singh/pii-redactor-openai-filter-draft-27may-c/label_config.json
-
curl -L -o label_config.json https://huggingface.co/cp112singh/pii-redactor-openai-filter-draft-27may-c/resolve/main/label_config.json
1.79 kB
| { | |
| "label2id": { | |
| "O": 0, | |
| "B-account_number": 1, | |
| "I-account_number": 2, | |
| "E-account_number": 3, | |
| "S-account_number": 4, | |
| "B-private_address": 5, | |
| "I-private_address": 6, | |
| "E-private_address": 7, | |
| "S-private_address": 8, | |
| "B-private_date": 9, | |
| "I-private_date": 10, | |
| "E-private_date": 11, | |
| "S-private_date": 12, | |
| "B-private_email": 13, | |
| "I-private_email": 14, | |
| "E-private_email": 15, | |
| "S-private_email": 16, | |
| "B-private_person": 17, | |
| "I-private_person": 18, | |
| "E-private_person": 19, | |
| "S-private_person": 20, | |
| "B-private_phone": 21, | |
| "I-private_phone": 22, | |
| "E-private_phone": 23, | |
| "S-private_phone": 24, | |
| "B-private_url": 25, | |
| "I-private_url": 26, | |
| "E-private_url": 27, | |
| "S-private_url": 28, | |
| "B-secret": 29, | |
| "I-secret": 30, | |
| "E-secret": 31, | |
| "S-secret": 32 | |
| }, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-account_number", | |
| "2": "I-account_number", | |
| "3": "E-account_number", | |
| "4": "S-account_number", | |
| "5": "B-private_address", | |
| "6": "I-private_address", | |
| "7": "E-private_address", | |
| "8": "S-private_address", | |
| "9": "B-private_date", | |
| "10": "I-private_date", | |
| "11": "E-private_date", | |
| "12": "S-private_date", | |
| "13": "B-private_email", | |
| "14": "I-private_email", | |
| "15": "E-private_email", | |
| "16": "S-private_email", | |
| "17": "B-private_person", | |
| "18": "I-private_person", | |
| "19": "E-private_person", | |
| "20": "S-private_person", | |
| "21": "B-private_phone", | |
| "22": "I-private_phone", | |
| "23": "E-private_phone", | |
| "24": "S-private_phone", | |
| "25": "B-private_url", | |
| "26": "I-private_url", | |
| "27": "E-private_url", | |
| "28": "S-private_url", | |
| "29": "B-secret", | |
| "30": "I-secret", | |
| "31": "E-secret", | |
| "32": "S-secret" | |
| } | |
| } |