Instructions to use UFNLP/gatortron-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UFNLP/gatortron-base with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("UFNLP/gatortron-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -30,14 +30,15 @@ gatortron-large | 8.9 billion
|
|
| 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'
|
| 36 |
-
config=AutoConfig.from_pretrained('UFNLP/gatortron-base'
|
| 37 |
-
mymodel=AutoModel.from_pretrained('UFNLP/gatortron-base'
|
| 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
|
|
|
|
| 30 |
```python
|
| 31 |
from huggingface_hub import login
|
| 32 |
from transformers import AutoModel, AutoTokenizer, AutoConfig
|
|
|
|
| 33 |
|
| 34 |
+
tokinizer= AutoTokenizer.from_pretrained('UFNLP/gatortron-base')
|
| 35 |
+
config=AutoConfig.from_pretrained('UFNLP/gatortron-base')
|
| 36 |
+
mymodel=AutoModel.from_pretrained('UFNLP/gatortron-base')
|
| 37 |
|
| 38 |
encoded_input=tokinizer("Bone scan: Negative for distant metastasis.", return_tensors="pt")
|
| 39 |
encoded_output = mymodel(**encoded_input)
|
| 40 |
+
print (encoded_output)
|
| 41 |
+
|
| 42 |
```
|
| 43 |
|
| 44 |
- An NLP pacakge using GatorTron for clinical concept extraction (Named Entity Recognition): https://github.com/uf-hobi-informatics-lab/ClinicalTransformerNER
|