Commit
·
1cf4bd8
1
Parent(s):
122e499
Update README.md
Browse files
README.md
CHANGED
@@ -27,7 +27,7 @@ More information needed
|
|
27 |
The model can be used for NLI tasks related to biomedical data and even be adapted to fact-checking tasks. It can be used from the Huggingface pipeline method as follows:
|
28 |
|
29 |
|
30 |
-
```
|
31 |
from transformers import TextClassificationPipeline, AutoModel, AutoTokenizer, AutoModelForSequenceClassification
|
32 |
model = AutoModelForSequenceClassification.from_pretrained("pritamdeka/PubMedBERT-MNLI-MedNLI", num_labels=3, id2label = {1: 'entailment', 0: 'contradiction',2:'neutral'})
|
33 |
tokenizer = AutoTokenizer.from_pretrained("pritamdeka/PubMedBERT-MNLI-MedNLI")
|
@@ -39,7 +39,7 @@ pipe(['ALDH1 expression is associated with better breast cancer outcomes',
|
|
39 |
|
40 |
The output for the above will be:
|
41 |
|
42 |
-
```
|
43 |
[[{'label': 'contradiction', 'score': 0.10193759202957153},
|
44 |
{'label': 'entailment', 'score': 0.2933262586593628},
|
45 |
{'label': 'neutral', 'score': 0.6047361493110657}],
|
|
|
27 |
The model can be used for NLI tasks related to biomedical data and even be adapted to fact-checking tasks. It can be used from the Huggingface pipeline method as follows:
|
28 |
|
29 |
|
30 |
+
```python
|
31 |
from transformers import TextClassificationPipeline, AutoModel, AutoTokenizer, AutoModelForSequenceClassification
|
32 |
model = AutoModelForSequenceClassification.from_pretrained("pritamdeka/PubMedBERT-MNLI-MedNLI", num_labels=3, id2label = {1: 'entailment', 0: 'contradiction',2:'neutral'})
|
33 |
tokenizer = AutoTokenizer.from_pretrained("pritamdeka/PubMedBERT-MNLI-MedNLI")
|
|
|
39 |
|
40 |
The output for the above will be:
|
41 |
|
42 |
+
```python
|
43 |
[[{'label': 'contradiction', 'score': 0.10193759202957153},
|
44 |
{'label': 'entailment', 'score': 0.2933262586593628},
|
45 |
{'label': 'neutral', 'score': 0.6047361493110657}],
|