AyoubChLin commited on
Commit
b05964f
1 Parent(s): 41bd2ae

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -9
README.md CHANGED
@@ -38,20 +38,21 @@ To use this model for zero-shot classification, you can follow the steps below:
38
 
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
46
- classifier = pipeline("zero-shot-classification", model=model, tokenizer=tokenizer)
47
 
48
- # Classify a sentence
49
- sentence = "The latest scientific breakthroughs in medicine"
50
- candidate_labels = ["politics", "sports", "technology", "business"]
51
 
52
- result = classifier(sentence, candidate_labels)
53
 
54
- print(result)
55
 
56
  ```
57
 
 
38
 
39
  4. Classify text using zero-shot classification:
40
 
41
+ ```python
42
+
43
 
44
+ from transformers import pipeline
45
 
46
+ # Create a zero-shot classification pipeline
47
+ classifier = pipeline("zero-shot-classification", model=model, tokenizer=tokenizer)
48
 
49
+ # Classify a sentence
50
+ sentence = "The latest scientific breakthroughs in medicine"
51
+ candidate_labels = ["politics", "sports", "technology", "business"]
52
 
53
+ result = classifier(sentence, candidate_labels)
54
 
55
+ print(result)
56
 
57
  ```
58