aai530-group6/ddxplus
Viewer • Updated • 1.29M • 609 • 8
How to use acharya-jyu/sapbert-pubmedbert-ddxplus-50k with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("feature-extraction", model="acharya-jyu/sapbert-pubmedbert-ddxplus-50k") # Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("acharya-jyu/sapbert-pubmedbert-ddxplus-50k")
model = AutoModel.from_pretrained("acharya-jyu/sapbert-pubmedbert-ddxplus-50k")This model is a fine-tuned version of cambridgeltl/SapBERT-from-PubMedBERT-fulltext on the DDXPlus dataset (50,000 samples) for medical diagnosis tasks.
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
The model was trained on DDXPlus dataset (50,000 samples) containing:
This model is designed for:
The model should NOT be used for:
from transformers import AutoTokenizer, AutoModel
# Load model and tokenizer
model_name = "acharya-jyu/sapbert-pubmedbert-ddxplus-10k"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModel.from_pretrained(model_name)
# Example input structure
input_data = {
'age': 45, # Patient age
'sex': 'M', # Patient sex: 'M' or 'F'
'initial_evidence': 'E_91', # Initial evidence code (e.g., E_91 for fever)
'evidences': [
'E_91', # Fever
'E_77', # Cough
'E_89' # Fatigue
]
}
# Process demographic data and evidence codes
outputs = model(**input_data)
# Outputs will include:
# - Main diagnosis prediction
# - Differential diagnosis probabilities
# - Confidence scores
Note: Evidence codes (E_XX) correspond to specific symptoms and conditions defined in the release_evidences.json file. The model expects these standardized codes rather than raw text input.
@misc{acharya2024sapbert,
title={SapBERT-PubMedBERT Fine-tuned on DDXPlus Dataset},
author={Acharya, Aashish},
year={2024},
publisher={Hugging Face Model Hub}
}