Feature Extraction
Transformers
Safetensors
English
bert
text-classification
icd10
healthcare
medical
custom_code
text-embeddings-inference
Instructions to use UMCU/ICD10_classifier_base_English with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UMCU/ICD10_classifier_base_English with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="UMCU/ICD10_classifier_base_English", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("UMCU/ICD10_classifier_base_English", trust_remote_code=True) model = AutoModelForSequenceClassification.from_pretrained("UMCU/ICD10_classifier_base_English", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -90,9 +90,9 @@ def get_feature_vector(text):
|
|
| 90 |
def reform(features, how='softmax'):
|
| 91 |
if how == 'softmax':
|
| 92 |
return torch.nn.functional.softmax(features)
|
| 93 |
-
elif how = 'gumbel':
|
| 94 |
return torch.nn.functional.gumbel_softmax(features)
|
| 95 |
-
elif how = 'normalize':
|
| 96 |
return torch.nn.functional.normalize(features.reshape(1,-1))
|
| 97 |
|
| 98 |
feature_vector = reform(get_feature_vector(text))
|
|
|
|
| 90 |
def reform(features, how='softmax'):
|
| 91 |
if how == 'softmax':
|
| 92 |
return torch.nn.functional.softmax(features)
|
| 93 |
+
elif how == 'gumbel':
|
| 94 |
return torch.nn.functional.gumbel_softmax(features)
|
| 95 |
+
elif how == 'normalize':
|
| 96 |
return torch.nn.functional.normalize(features.reshape(1,-1))
|
| 97 |
|
| 98 |
feature_vector = reform(get_feature_vector(text))
|