Instructions to use ncbi/MedCPT-Article-Encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ncbi/MedCPT-Article-Encoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="ncbi/MedCPT-Article-Encoder")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("ncbi/MedCPT-Article-Encoder") model = AutoModel.from_pretrained("ncbi/MedCPT-Article-Encoder") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -44,7 +44,7 @@ articles = [
|
|
| 44 |
]
|
| 45 |
|
| 46 |
with torch.no_grad():
|
| 47 |
-
# tokenize the
|
| 48 |
encoded = tokenizer(
|
| 49 |
articles,
|
| 50 |
truncation=True,
|
|
|
|
| 44 |
]
|
| 45 |
|
| 46 |
with torch.no_grad():
|
| 47 |
+
# tokenize the articles
|
| 48 |
encoded = tokenizer(
|
| 49 |
articles,
|
| 50 |
truncation=True,
|