This model is a fine-tuned version of
distilbert/distilgpt2 on the
tsilva/clinical-field-mappings dataset.
Its purpose is to normalize healthcare database column names to a standardized set of target column names.
This model is a sequence classification model that maps free-text field names to a set of standardized schema terms.
tokenizer = AutoTokenizer.from_pretrained("tsilva/clinical-field-mapper-classification")
model = AutoModelForSequenceClassification.from_pretrained("tsilva/clinical-field-mapper-classification")
def predict(input_text):
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model(**inputs)
pred = outputs.logits.argmax(-1).item()
label = model.config.id2label[str(pred)] if hasattr(model.config, 'id2label') else pred
print(f"Predicted label: family_history_reported")