Kavyaah commited on
Commit
8c97f07
·
verified ·
1 Parent(s): ac434cc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -15
README.md CHANGED
@@ -26,9 +26,9 @@ Training Dataset: Custom dataset of clinical notes, ICD codes, and supporting ev
26
  Task: Causal Language Modeling for code prediction
27
 
28
  ## Usage
29
-
30
- from transformers import AutoTokenizer, AutoModelForCausalLM
31
- import torch, re
32
 
33
  # Load tokenizer and model
34
  tokenizer = AutoTokenizer.from_pretrained("Kavyaah/medical-coding-llm")
@@ -49,21 +49,13 @@ import torch, re
49
  match = re.search(r"\b[A-Z]\d{1,3}\.?[A-Z0-9]*\b", result)
50
  return match.group(0).strip() if match else result.strip()
51
 
52
- #### Example
53
- statement = "Patient diagnosed with Type 2 diabetes mellitus without complications."
54
- print(get_code(statement))
55
- #### Output: E11.9
56
 
57
  ## Evaluation
58
 
59
- Tested on a small example set:
60
-
61
- Statement True Code Predicted Code
62
- Type 2 diabetes E11.9 E11.9
63
- Acute bronchitis J20.0 J20.9
64
- Routine child health exam Z00.129 99395
65
- Essential hypertension I10 99213
66
-
67
  Exact match accuracy: 25%
68
 
69
  Semantic accuracy (ICD block match): 50%
 
26
  Task: Causal Language Modeling for code prediction
27
 
28
  ## Usage
29
+ #
30
+ from transformers import AutoTokenizer, AutoModelForCausalLM
31
+ import torch, re
32
 
33
  # Load tokenizer and model
34
  tokenizer = AutoTokenizer.from_pretrained("Kavyaah/medical-coding-llm")
 
49
  match = re.search(r"\b[A-Z]\d{1,3}\.?[A-Z0-9]*\b", result)
50
  return match.group(0).strip() if match else result.strip()
51
 
52
+ # Example
53
+ statement = "Patient diagnosed with Type 2 diabetes mellitus without complications."
54
+ print(get_code(statement))
55
+ # Output: E11.9
56
 
57
  ## Evaluation
58
 
 
 
 
 
 
 
 
 
59
  Exact match accuracy: 25%
60
 
61
  Semantic accuracy (ICD block match): 50%