Update README.md
Browse files
README.md
CHANGED
@@ -27,6 +27,18 @@ 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 |
+
login(token="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")
|
34 |
+
|
35 |
+
tokinizer= AutoTokenizer.from_pretrained('UFNLP/gatortron-base', use_auth_token=True)
|
36 |
+
config=AutoConfig.from_pretrained('UFNLP/gatortron-base', use_auth_token=True)
|
37 |
+
mymodel=AutoModel.from_pretrained('UFNLP/gatortron-base', use_auth_token=True)
|
38 |
+
|
39 |
+
encoded_input=tokinizer("Bone scan: Negative for distant metastasis.", return_tensors="pt")
|
40 |
+
encoded_output = mymodel(**encoded_input)
|
41 |
+
```
|
42 |
|
43 |
- An NLP pacakge using GatorTron for clinical concept extraction (Named Entity Recognition): https://github.com/uf-hobi-informatics-lab/ClinicalTransformerNER
|
44 |
- An NLP pacakge using GatorTron for Relation Extraction: https://github.com/uf-hobi-informatics-lab/ClinicalTransformerRelationExtraction
|