Instructions to use h2oai/deberta_finetuned_pii with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use h2oai/deberta_finetuned_pii with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="h2oai/deberta_finetuned_pii")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("h2oai/deberta_finetuned_pii") model = AutoModelForTokenClassification.from_pretrained("h2oai/deberta_finetuned_pii") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -28,10 +28,8 @@ How to do Inference :
|
|
| 28 |
|
| 29 |
```
|
| 30 |
from transformers import pipeline
|
| 31 |
-
gen = pipeline("token-classification", "
|
| 32 |
|
| 33 |
text = "My name is John and I live in California."
|
| 34 |
output = gen(text, aggregation_strategy="first")
|
| 35 |
```
|
| 36 |
-
|
| 37 |
-
For any more details reach out to lakshaya.khandelwal@gmail.com
|
|
|
|
| 28 |
|
| 29 |
```
|
| 30 |
from transformers import pipeline
|
| 31 |
+
gen = pipeline("token-classification", "h2oai/deberta_finetuned_pii", device=-1)
|
| 32 |
|
| 33 |
text = "My name is John and I live in California."
|
| 34 |
output = gen(text, aggregation_strategy="first")
|
| 35 |
```
|
|
|
|
|
|