AyoubChLin
commited on
Commit
•
41bd2ae
1
Parent(s):
1b11ce0
Update README.md
Browse files
README.md
CHANGED
@@ -27,6 +27,7 @@ To use this model for zero-shot classification, you can follow the steps below:
|
|
27 |
|
28 |
1. Load the trained model:
|
29 |
```python
|
|
|
30 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
31 |
|
32 |
tokenizer = AutoTokenizer.from_pretrained("AyoubChLin/DistilBERT_ZeroShot")
|
@@ -38,6 +39,7 @@ To use this model for zero-shot classification, you can follow the steps below:
|
|
38 |
4. Classify text using zero-shot classification:
|
39 |
|
40 |
```python
|
|
|
41 |
from transformers import pipeline
|
42 |
|
43 |
# Create a zero-shot classification pipeline
|
@@ -50,6 +52,7 @@ To use this model for zero-shot classification, you can follow the steps below:
|
|
50 |
result = classifier(sentence, candidate_labels)
|
51 |
|
52 |
print(result)
|
|
|
53 |
```
|
54 |
|
55 |
The output will be a dictionary containing the classified label and the corresponding classification score.
|
|
|
27 |
|
28 |
1. Load the trained model:
|
29 |
```python
|
30 |
+
|
31 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
32 |
|
33 |
tokenizer = AutoTokenizer.from_pretrained("AyoubChLin/DistilBERT_ZeroShot")
|
|
|
39 |
4. Classify text using zero-shot classification:
|
40 |
|
41 |
```python
|
42 |
+
|
43 |
from transformers import pipeline
|
44 |
|
45 |
# Create a zero-shot classification pipeline
|
|
|
52 |
result = classifier(sentence, candidate_labels)
|
53 |
|
54 |
print(result)
|
55 |
+
|
56 |
```
|
57 |
|
58 |
The output will be a dictionary containing the classified label and the corresponding classification score.
|