text-classification document sections sentence classification document classification medical health biomedical

BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext_pub_section

usage in python

install transformers as needed:

pip install -U transformers

Run the following, changing the example text to your use case:

from transformers import pipeline

model_tag = "ml4pubmed/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext_pub_section"
classifier = pipeline(
              'text-classification', 
              model=model_tag, 
            )
            
prompt = """
Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train.
"""

classifier(
    prompt,
) # classify the sentence

metadata

training_metrics