Instructions to use MDDDDR/roberta_large_NER with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MDDDDR/roberta_large_NER with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="MDDDDR/roberta_large_NER")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("MDDDDR/roberta_large_NER") model = AutoModelForTokenClassification.from_pretrained("MDDDDR/roberta_large_NER", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -52,7 +52,7 @@ pred = [p for p in np.argmax(logits, axis=2)][0][1:-1]
|
|
| 52 |
|
| 53 |
# Check pred
|
| 54 |
for txt, pred in zip(tokenizer.tokenize(text), pred):
|
| 55 |
-
print("{}\t{}".format(id2tag[pred], txt)
|
| 56 |
-
# B_MT
|
| 57 |
-
# B_MT
|
| 58 |
```
|
|
|
|
| 52 |
|
| 53 |
# Check pred
|
| 54 |
for txt, pred in zip(tokenizer.tokenize(text), pred):
|
| 55 |
+
print("{}\t{}".format(id2tag[pred], txt))
|
| 56 |
+
# B_MT ▁mental
|
| 57 |
+
# B_MT ▁disorder
|
| 58 |
```
|