AkshatSurolia commited on
Commit
831fbb7
1 Parent(s): 30847ee

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -32
README.md CHANGED
@@ -1,33 +1,31 @@
1
- ---
2
- license: apache-2.0
3
- tags:
4
- - text-classification
5
- datasets:
6
- - Mimic III
7
- ---
8
-
9
- # Clinical BERT for ICD-10 Prediction
10
-
11
- The Publicly Available Clinical BERT Embeddings paper contains four unique clinicalBERT models: initialized with BERT-Base (cased_L-12_H-768_A-12) or BioBERT (BioBERT-Base v1.0 + PubMed 200K + PMC 270K) & trained on either all MIMIC notes or only discharge summaries.
12
-
13
- ---
14
-
15
- ## How to use the model
16
-
17
- Load the model via the transformers library:
18
-
19
- from transformers import AutoTokenizer, BertForSequenceClassification
20
- tokenizer = AutoTokenizer.from_pretrained("AkshatSurolia/ICD-10-Code-Prediction")
21
- model = BertForSequenceClassification.from_pretrained("AkshatSurolia/ICD-10-Code-Prediction")
22
- config = model.config
23
-
24
- Run the model with clinical diagonosis text:
25
-
26
- text = "subarachnoid hemorrhage scalp laceration service: surgery major surgical or invasive"
27
- encoded_input = tokenizer(text, return_tensors='pt')
28
- output = model(**encoded_input)
29
-
30
- Return the Top-5 predicted ICD-10 codes:
31
-
32
- results = output.logits.detach().cpu().numpy()[0].argsort()[::-1][:5]
33
  return [ config.id2label[ids] for ids in results]
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - text-classification
5
+ ---
6
+
7
+ # Clinical BERT for ICD-10 Prediction
8
+
9
+ The Publicly Available Clinical BERT Embeddings paper contains four unique clinicalBERT models: initialized with BERT-Base (cased_L-12_H-768_A-12) or BioBERT (BioBERT-Base v1.0 + PubMed 200K + PMC 270K) & trained on either all MIMIC notes or only discharge summaries.
10
+
11
+ ---
12
+
13
+ ## How to use the model
14
+
15
+ Load the model via the transformers library:
16
+
17
+ from transformers import AutoTokenizer, BertForSequenceClassification
18
+ tokenizer = AutoTokenizer.from_pretrained("AkshatSurolia/ICD-10-Code-Prediction")
19
+ model = BertForSequenceClassification.from_pretrained("AkshatSurolia/ICD-10-Code-Prediction")
20
+ config = model.config
21
+
22
+ Run the model with clinical diagonosis text:
23
+
24
+ text = "subarachnoid hemorrhage scalp laceration service: surgery major surgical or invasive"
25
+ encoded_input = tokenizer(text, return_tensors='pt')
26
+ output = model(**encoded_input)
27
+
28
+ Return the Top-5 predicted ICD-10 codes:
29
+
30
+ results = output.logits.detach().cpu().numpy()[0].argsort()[::-1][:5]
 
 
31
  return [ config.id2label[ids] for ids in results]