Views
No views yet
| BI-RADS | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| 0 | 0.9946 | 0.9482 | 0.9708 | 193 |
| 1 | 0.9504 | 0.9664 | 0.9583 | 119 |
| 2 | 0.9740 | 0.9943 | 0.9840 | 527 |
| 3 | 1.0000 | 0.8333 | 0.9091 | 18 |
| 4 | 0.9000 | 0.8182 | 0.8571 | 11 |
| 5 | 0.6667 | 0.6667 | 0.6667 | 3 |
| 6 | 1.0000 | 1.0000 | 1.0000 | 1 |
1from transformers import AutoTokenizer, BioGptForSequenceClassification
2import torch
3
4# Load model and tokenizer
5model = BioGptForSequenceClassification.from_pretrained("ishro/biogpt-aura")
6tokenizer = AutoTokenizer.from_pretrained("ishro/biogpt-aura")
7
8# Prepare input
9report_text = "Your radiology report text here..."
10inputs = tokenizer(report_text, return_tensors="pt", padding=True, truncation=True, max_length=512)
11
12# Get prediction
13with torch.no_grad():
14 outputs = model(**inputs)
15 predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
16 predicted_class = torch.argmax(predictions, dim=-1).item()
17
18# Map to BI-RADS label
19birads_label = model.config.id2label[predicted_class]
20print(f"Predicted BI-RADS: {birads_label}")
21print(f"Confidence: {predictions[0][predicted_class].item():.4f}")1@misc{biogpt-birads-classifier,
2 author = {Your Name},
3 title = {BioGPT BI-RADS Classifier},
4 year = {2025},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/ishro/biogpt-aura}
7}