Instructions to use d4data/biomedical-ner-all with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use d4data/biomedical-ner-all with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="d4data/biomedical-ner-all")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("d4data/biomedical-ner-all") model = AutoModelForTokenClassification.from_pretrained("d4data/biomedical-ner-all") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -34,8 +34,8 @@ The easiest way is to load the inference api from huggingface and second method
|
|
| 34 |
from transformers import pipeline
|
| 35 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 36 |
|
| 37 |
-
tokenizer = AutoTokenizer.from_pretrained("d4data/biomedical-all")
|
| 38 |
-
model = AutoModelForTokenClassification.from_pretrained("d4data/biomedical-all")
|
| 39 |
|
| 40 |
pipe = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple") # pass device=0 if using gpu
|
| 41 |
pipe("""The patient reported no recurrence of palpitations at follow-up 6 months after the ablation.""")
|
|
|
|
| 34 |
from transformers import pipeline
|
| 35 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 36 |
|
| 37 |
+
tokenizer = AutoTokenizer.from_pretrained("d4data/biomedical-ner-all")
|
| 38 |
+
model = AutoModelForTokenClassification.from_pretrained("d4data/biomedical-ner-all")
|
| 39 |
|
| 40 |
pipe = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple") # pass device=0 if using gpu
|
| 41 |
pipe("""The patient reported no recurrence of palpitations at follow-up 6 months after the ablation.""")
|