Token Classification
GLiNER
PyTorch
English
entity recognition
named-entity-recognition
zero-shot
zero-shot-ner
zero shot
biomedical-nlp
chemical-entity-recognition
drug-discovery
pharmacology
biocuration
chemical
Instructions to use OpenMed/OpenMed-ZeroShot-NER-Pharma-Small-166M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER
How to use OpenMed/OpenMed-ZeroShot-NER-Pharma-Small-166M with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("OpenMed/OpenMed-ZeroShot-NER-Pharma-Small-166M") text = "Cristiano Ronaldo dos Santos Aveiro was born on 5 February 1985 in Funchal, Madeira, Portugal." labels = ["person", "date", "location"] entities = model.predict_entities(text, labels) for entity in entities: print(entity["text"], "=>", entity["label"]) - Notebooks
- Google Colab
- Kaggle
Download test_results.json from OpenMed/OpenMed-ZeroShot-NER-Pharma-Small-166M: direct link, hf CLI and curl.
- Browser
- Download file 208 Bytes
-
https://huggingface.co/OpenMed/OpenMed-ZeroShot-NER-Pharma-Small-166M/resolve/main/test_results.json
- Command line
-
hf download hf://OpenMed/OpenMed-ZeroShot-NER-Pharma-Small-166M/test_results.json
-
curl -L -o test_results.json https://huggingface.co/OpenMed/OpenMed-ZeroShot-NER-Pharma-Small-166M/resolve/main/test_results.json
208 Bytes
| { | |
| "eval_loss": 146.35885620117188, | |
| "seqeval_accuracy": 0.9706151802482708, | |
| "seqeval_f1": 0.8553641480470748, | |
| "seqeval_precision": 0.7908847184986595, | |
| "seqeval_recall": 0.9312906220984215 | |
| } |