kaixkhazaki
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -32,7 +32,38 @@ It achieves the following results on the evaluation set:
|
|
32 |
- F1: 0.7740
|
33 |
- Precision: 0.7804
|
34 |
- Recall: 0.7731
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
## Model description
|
37 |
|
38 |
More information needed
|
|
|
32 |
- F1: 0.7740
|
33 |
- Precision: 0.7804
|
34 |
- Recall: 0.7731
|
35 |
+
|
36 |
+
## Usage
|
37 |
+
|
38 |
+
```python
|
39 |
+
# Use a pipeline as a high-level helper
|
40 |
+
from transformers import pipeline
|
41 |
+
|
42 |
+
pipe = pipeline("zero-shot-classification", model="kaixkhazaki/turkish-zeroshot")
|
43 |
+
|
44 |
+
#Enter your text and possible candidates of classification
|
45 |
+
sequence = "Bu laptopun pil ömrü ne kadar dayanıyor?"
|
46 |
+
candidate_labels = ["ürün özellikleri", "soru", "bilgi talebi", "laptop", "teknik destek"]
|
47 |
+
|
48 |
+
pipe(
|
49 |
+
sequence,
|
50 |
+
candidate_labels,
|
51 |
+
)
|
52 |
+
|
53 |
+
>>
|
54 |
+
{'sequence': 'Bu laptopun pil ömrü ne kadar dayanıyor?',
|
55 |
+
'labels': ['ürün özellikleri',
|
56 |
+
'soru',
|
57 |
+
'bilgi talebi',
|
58 |
+
'laptop',
|
59 |
+
'teknik destek'],
|
60 |
+
'scores': [0.296932578086853,
|
61 |
+
0.2693993151187897,
|
62 |
+
0.20735479891300201,
|
63 |
+
0.12200483679771423,
|
64 |
+
0.10430848598480225]}
|
65 |
+
|
66 |
+
```
|
67 |
## Model description
|
68 |
|
69 |
More information needed
|