Views
No views yet
| Class | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| 0 | 0.72 | 0.83 | 0.77 | 211 |
| 1 | 0.82 | 0.77 | 0.79 | 242 |
| 2 | 0.82 | 0.86 | 0.84 | 251 |
| 3 | 0.92 | 0.89 | 0.90 | 228 |
| 4 | 0.81 | 0.85 | 0.83 | 220 |
| 5 | 0.90 | 0.93 | 0.91 | 244 |
| 6 | 0.87 | 0.87 | 0.87 | 230 |
| 7 | 0.92 | 0.88 | 0.90 | 251 |
| 8 | 0.94 | 0.90 | 0.92 | 237 |
| 9 | 0.87 | 0.88 | 0.87 | 263 |
| 10 | 0.70 | 0.88 | 0.78 | 189 |
| 11 | 0.90 | 0.81 | 0.85 | 248 |
| 12 | 0.87 | 0.90 | 0.88 | 222 |
| 13 | 0.76 | 0.72 | 0.74 | 255 |
| 14 | 0.84 | 0.84 | 0.84 | 241 |
| 15 | 0.92 | 0.79 | 0.85 | 276 |
| 16 | 0.95 | 0.90 | 0.92 | 258 |
| 17 | 0.71 | 0.82 | 0.76 | 200 |
| 18 | 0.77 | 0.73 | 0.75 | 215 |
| 19 | 0.92 | 0.91 | 0.92 | 239 |
| Accuracy | --- 0.85 --- | |||
| Macro Avg | 0.85 | 0.85 | 0.85 | 4720 |
| Weighted Avg | 0.85 | 0.85 | 0.85 | 4720 |
1from transformers import AutoModelForSequenceClassification
2from transformers import TextClassificationPipeline, AutoTokenizer
3
4mp = 'z-dickson/CAP_multilingual'
5model = AutoModelForSequenceClassification.from_pretrained(mp)
6tokenizer = AutoTokenizer.from_pretrained(mp)
7
8classifier = TextClassificationPipeline(tokenizer=tokenizer, model=model, device=0)
9
10classifier("""
11To ask the Secretary of State for Energy and Climate \\
12Change what estimate he has made of the proportion of carbon \\
13dioxide emissions arising in the UK attributable to burning.
14"""
15)