ncbi/ncbi_disease
Updated • 2.36k • 53
How to use sarahmiller137/BiomedNLP-PubMedBERT-base-uncased-abstract-ft-ncbi-disease with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="sarahmiller137/BiomedNLP-PubMedBERT-base-uncased-abstract-ft-ncbi-disease") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("sarahmiller137/BiomedNLP-PubMedBERT-base-uncased-abstract-ft-ncbi-disease")
model = AutoModelForTokenClassification.from_pretrained("sarahmiller137/BiomedNLP-PubMedBERT-base-uncased-abstract-ft-ncbi-disease", device_map="auto")microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract model finetuned using the ncbi_disease dataset from the datasets library.
This model is intended to be used for named entity recoginition tasks. The model will identify disease entities in text. The model will predict lables based upon the NCBI-disease dataset, please see the dataset information for details.
Note that the dataset and model may not be fully represetative or suitable for all needs it is recommended that the paper for the dataset and the base model card should be reviewed before using the model -
Load the model from the library using the following checkpoints:
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("sarahmiller137/BiomedNLP-PubMedBERT-base-uncased-abstract-ft-ncbi-disease")
model = AutoModel.from_pretrained("sarahmiller137/BiomedNLP-PubMedBERT-base-uncased-abstract-ft-ncbi-disease")