yonghuiwu commited on
Commit
fa26197
1 Parent(s): a022fb7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -0
README.md CHANGED
@@ -27,6 +27,17 @@ gatortron-large | 8.9 billion
27
 
28
  <h2>How to use</h2>
29
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  - An NLP pacakge using GatorTron for clinical concept extraction (Named Entity Recognition): https://github.com/uf-hobi-informatics-lab/ClinicalTransformerNER
32
  - An NLP pacakge using GatorTron for Relation Extraction: https://github.com/uf-hobi-informatics-lab/ClinicalTransformerRelationExtraction
 
27
 
28
  <h2>How to use</h2>
29
 
30
+ ```python
31
+ from huggingface_hub import login
32
+ from transformers import AutoModel, AutoTokenizer, AutoConfig
33
+
34
+ tokinizer= AutoTokenizer.from_pretrained('UFNLP/gatortron-medium')
35
+ config=AutoConfig.from_pretrained('UFNLP/gatortron-medium')
36
+ mymodel=AutoModel.from_pretrained('UFNLP/gatortron-medium')
37
+
38
+ encoded_input=tokinizer("Bone scan: Negative for distant metastasis.", return_tensors="pt")
39
+ encoded_output = mymodel(**encoded_input)
40
+ ```
41
 
42
  - An NLP pacakge using GatorTron for clinical concept extraction (Named Entity Recognition): https://github.com/uf-hobi-informatics-lab/ClinicalTransformerNER
43
  - An NLP pacakge using GatorTron for Relation Extraction: https://github.com/uf-hobi-informatics-lab/ClinicalTransformerRelationExtraction