Update README.md
Browse files
README.md
CHANGED
|
@@ -6,19 +6,22 @@ tags:
|
|
| 6 |
- text-classification
|
| 7 |
- generated_from_setfit_trainer
|
| 8 |
metrics:
|
| 9 |
-
-
|
|
|
|
| 10 |
widget:
|
| 11 |
-
- text:
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
| 19 |
as much science in that as the crap she spouts
|
| 20 |
-
- text: "Can she skip school by herself and sit infront of parliament? \r\n Fake emotions
|
| 21 |
-
\ and just a good actor."
|
| 22 |
- text: my dad had huge ones..so they may be real..
|
| 23 |
pipeline_tag: text-classification
|
| 24 |
inference: false
|
|
@@ -37,318 +40,69 @@ model-index:
|
|
| 37 |
- type: metric
|
| 38 |
value: 0.688144336139226
|
| 39 |
name: Metric
|
|
|
|
|
|
|
|
|
|
| 40 |
---
|
| 41 |
|
| 42 |
-
#
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
-
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
| 50 |
-
|
| 51 |
-
## Model Details
|
| 52 |
-
|
| 53 |
-
### Model Description
|
| 54 |
-
- **Model Type:** SetFit
|
| 55 |
-
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
|
| 56 |
-
- **Classification head:** a ClassifierChain instance
|
| 57 |
-
- **Maximum Sequence Length:** 512 tokens
|
| 58 |
-
<!-- - **Number of Classes:** Unknown -->
|
| 59 |
-
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
| 60 |
-
<!-- - **Language:** Unknown -->
|
| 61 |
-
<!-- - **License:** Unknown -->
|
| 62 |
-
|
| 63 |
-
### Model Sources
|
| 64 |
-
|
| 65 |
-
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
| 66 |
-
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
| 67 |
-
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
| 68 |
-
|
| 69 |
-
## Evaluation
|
| 70 |
-
|
| 71 |
-
### Metrics
|
| 72 |
-
| Label | Metric |
|
| 73 |
-
|:--------|:-------|
|
| 74 |
-
| **all** | 0.6881 |
|
| 75 |
-
|
| 76 |
-
## Uses
|
| 77 |
-
|
| 78 |
-
### Direct Use for Inference
|
| 79 |
-
|
| 80 |
-
First install the SetFit library:
|
| 81 |
-
|
| 82 |
-
```bash
|
| 83 |
-
pip install setfit
|
| 84 |
-
```
|
| 85 |
-
|
| 86 |
-
Then you can load this model and run inference.
|
| 87 |
-
|
| 88 |
-
```python
|
| 89 |
-
from setfit import SetFitModel
|
| 90 |
-
|
| 91 |
-
# Download from the 🤗 Hub
|
| 92 |
-
model = SetFitModel.from_pretrained("CrisisNarratives/setfit-9classes-multi_label")
|
| 93 |
-
# Run inference
|
| 94 |
-
preds = model("my dad had huge ones..so they may be real..")
|
| 95 |
-
```
|
| 96 |
-
|
| 97 |
-
<!--
|
| 98 |
-
### Downstream Use
|
| 99 |
-
|
| 100 |
-
*List how someone could finetune this model on their own dataset.*
|
| 101 |
-
-->
|
| 102 |
-
|
| 103 |
-
<!--
|
| 104 |
-
### Out-of-Scope Use
|
| 105 |
-
|
| 106 |
-
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 107 |
-
-->
|
| 108 |
-
|
| 109 |
-
<!--
|
| 110 |
-
## Bias, Risks and Limitations
|
| 111 |
-
|
| 112 |
-
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 113 |
-
-->
|
| 114 |
-
|
| 115 |
-
<!--
|
| 116 |
-
### Recommendations
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
|
| 121 |
-
|
| 122 |
|
| 123 |
-
###
|
| 124 |
-
| Training set | Min | Median | Max |
|
| 125 |
-
|:-------------|:----|:--------|:-----|
|
| 126 |
-
| Word count | 1 | 25.8891 | 1681 |
|
| 127 |
|
| 128 |
-
|
| 129 |
-
-
|
| 130 |
-
- num_epochs: (3, 3)
|
| 131 |
-
- max_steps: -1
|
| 132 |
-
- sampling_strategy: oversampling
|
| 133 |
-
- num_iterations: 40
|
| 134 |
-
- body_learning_rate: (1.752e-05, 1.752e-05)
|
| 135 |
-
- head_learning_rate: 1.752e-05
|
| 136 |
-
- loss: CosineSimilarityLoss
|
| 137 |
-
- distance_metric: cosine_distance
|
| 138 |
-
- margin: 0.25
|
| 139 |
-
- end_to_end: False
|
| 140 |
-
- use_amp: False
|
| 141 |
-
- warmup_proportion: 0.1
|
| 142 |
-
- seed: 30
|
| 143 |
-
- eval_max_steps: -1
|
| 144 |
-
- load_best_model_at_end: False
|
| 145 |
|
| 146 |
-
|
| 147 |
-
| Epoch | Step | Training Loss | Validation Loss |
|
| 148 |
-
|:------:|:----:|:-------------:|:---------------:|
|
| 149 |
-
| 0.0004 | 1 | 0.3395 | - |
|
| 150 |
-
| 0.0185 | 50 | 0.3628 | - |
|
| 151 |
-
| 0.0370 | 100 | 0.2538 | - |
|
| 152 |
-
| 0.0555 | 150 | 0.2044 | - |
|
| 153 |
-
| 0.0739 | 200 | 0.1831 | - |
|
| 154 |
-
| 0.0924 | 250 | 0.2218 | - |
|
| 155 |
-
| 0.1109 | 300 | 0.2014 | - |
|
| 156 |
-
| 0.1294 | 350 | 0.2405 | - |
|
| 157 |
-
| 0.1479 | 400 | 0.1238 | - |
|
| 158 |
-
| 0.1664 | 450 | 0.1658 | - |
|
| 159 |
-
| 0.1848 | 500 | 0.1974 | - |
|
| 160 |
-
| 0.2033 | 550 | 0.1565 | - |
|
| 161 |
-
| 0.2218 | 600 | 0.1131 | - |
|
| 162 |
-
| 0.2403 | 650 | 0.0994 | - |
|
| 163 |
-
| 0.2588 | 700 | 0.0743 | - |
|
| 164 |
-
| 0.2773 | 750 | 0.0259 | - |
|
| 165 |
-
| 0.2957 | 800 | 0.1852 | - |
|
| 166 |
-
| 0.3142 | 850 | 0.1896 | - |
|
| 167 |
-
| 0.3327 | 900 | 0.1102 | - |
|
| 168 |
-
| 0.3512 | 950 | 0.0951 | - |
|
| 169 |
-
| 0.3697 | 1000 | 0.0619 | - |
|
| 170 |
-
| 0.3882 | 1050 | 0.0227 | - |
|
| 171 |
-
| 0.4067 | 1100 | 0.0986 | - |
|
| 172 |
-
| 0.4251 | 1150 | 0.0375 | - |
|
| 173 |
-
| 0.4436 | 1200 | 0.1151 | - |
|
| 174 |
-
| 0.4621 | 1250 | 0.1128 | - |
|
| 175 |
-
| 0.4806 | 1300 | 0.0334 | - |
|
| 176 |
-
| 0.4991 | 1350 | 0.1012 | - |
|
| 177 |
-
| 0.5176 | 1400 | 0.0895 | - |
|
| 178 |
-
| 0.5360 | 1450 | 0.072 | - |
|
| 179 |
-
| 0.5545 | 1500 | 0.0619 | - |
|
| 180 |
-
| 0.5730 | 1550 | 0.0852 | - |
|
| 181 |
-
| 0.5915 | 1600 | 0.0611 | - |
|
| 182 |
-
| 0.6100 | 1650 | 0.0679 | - |
|
| 183 |
-
| 0.6285 | 1700 | 0.0238 | - |
|
| 184 |
-
| 0.6470 | 1750 | 0.1776 | - |
|
| 185 |
-
| 0.6654 | 1800 | 0.081 | - |
|
| 186 |
-
| 0.6839 | 1850 | 0.1059 | - |
|
| 187 |
-
| 0.7024 | 1900 | 0.045 | - |
|
| 188 |
-
| 0.7209 | 1950 | 0.0664 | - |
|
| 189 |
-
| 0.7394 | 2000 | 0.0666 | - |
|
| 190 |
-
| 0.7579 | 2050 | 0.0714 | - |
|
| 191 |
-
| 0.7763 | 2100 | 0.0312 | - |
|
| 192 |
-
| 0.7948 | 2150 | 0.0461 | - |
|
| 193 |
-
| 0.8133 | 2200 | 0.0946 | - |
|
| 194 |
-
| 0.8318 | 2250 | 0.047 | - |
|
| 195 |
-
| 0.8503 | 2300 | 0.0906 | - |
|
| 196 |
-
| 0.8688 | 2350 | 0.0186 | - |
|
| 197 |
-
| 0.8872 | 2400 | 0.0937 | - |
|
| 198 |
-
| 0.9057 | 2450 | 0.1674 | - |
|
| 199 |
-
| 0.9242 | 2500 | 0.0311 | - |
|
| 200 |
-
| 0.9427 | 2550 | 0.0884 | - |
|
| 201 |
-
| 0.9612 | 2600 | 0.0787 | - |
|
| 202 |
-
| 0.9797 | 2650 | 0.192 | - |
|
| 203 |
-
| 0.9982 | 2700 | 0.0689 | - |
|
| 204 |
-
| 1.0166 | 2750 | 0.0945 | - |
|
| 205 |
-
| 1.0351 | 2800 | 0.066 | - |
|
| 206 |
-
| 1.0536 | 2850 | 0.0592 | - |
|
| 207 |
-
| 1.0721 | 2900 | 0.068 | - |
|
| 208 |
-
| 1.0906 | 2950 | 0.0619 | - |
|
| 209 |
-
| 1.1091 | 3000 | 0.0329 | - |
|
| 210 |
-
| 1.1275 | 3050 | 0.0986 | - |
|
| 211 |
-
| 1.1460 | 3100 | 0.0468 | - |
|
| 212 |
-
| 1.1645 | 3150 | 0.0717 | - |
|
| 213 |
-
| 1.1830 | 3200 | 0.0721 | - |
|
| 214 |
-
| 1.2015 | 3250 | 0.0345 | - |
|
| 215 |
-
| 1.2200 | 3300 | 0.0317 | - |
|
| 216 |
-
| 1.2384 | 3350 | 0.0476 | - |
|
| 217 |
-
| 1.2569 | 3400 | 0.122 | - |
|
| 218 |
-
| 1.2754 | 3450 | 0.0576 | - |
|
| 219 |
-
| 1.2939 | 3500 | 0.0375 | - |
|
| 220 |
-
| 1.3124 | 3550 | 0.1074 | - |
|
| 221 |
-
| 1.3309 | 3600 | 0.113 | - |
|
| 222 |
-
| 1.3494 | 3650 | 0.0564 | - |
|
| 223 |
-
| 1.3678 | 3700 | 0.0437 | - |
|
| 224 |
-
| 1.3863 | 3750 | 0.0623 | - |
|
| 225 |
-
| 1.4048 | 3800 | 0.0213 | - |
|
| 226 |
-
| 1.4233 | 3850 | 0.0629 | - |
|
| 227 |
-
| 1.4418 | 3900 | 0.059 | - |
|
| 228 |
-
| 1.4603 | 3950 | 0.0807 | - |
|
| 229 |
-
| 1.4787 | 4000 | 0.0946 | - |
|
| 230 |
-
| 1.4972 | 4050 | 0.0381 | - |
|
| 231 |
-
| 1.5157 | 4100 | 0.0451 | - |
|
| 232 |
-
| 1.5342 | 4150 | 0.0742 | - |
|
| 233 |
-
| 1.5527 | 4200 | 0.0899 | - |
|
| 234 |
-
| 1.5712 | 4250 | 0.0722 | - |
|
| 235 |
-
| 1.5896 | 4300 | 0.1022 | - |
|
| 236 |
-
| 1.6081 | 4350 | 0.0446 | - |
|
| 237 |
-
| 1.6266 | 4400 | 0.022 | - |
|
| 238 |
-
| 1.6451 | 4450 | 0.0586 | - |
|
| 239 |
-
| 1.6636 | 4500 | 0.0585 | - |
|
| 240 |
-
| 1.6821 | 4550 | 0.0409 | - |
|
| 241 |
-
| 1.7006 | 4600 | 0.0253 | - |
|
| 242 |
-
| 1.7190 | 4650 | 0.0363 | - |
|
| 243 |
-
| 1.7375 | 4700 | 0.0492 | - |
|
| 244 |
-
| 1.7560 | 4750 | 0.0154 | - |
|
| 245 |
-
| 1.7745 | 4800 | 0.0427 | - |
|
| 246 |
-
| 1.7930 | 4850 | 0.0284 | - |
|
| 247 |
-
| 1.8115 | 4900 | 0.022 | - |
|
| 248 |
-
| 1.8299 | 4950 | 0.0335 | - |
|
| 249 |
-
| 1.8484 | 5000 | 0.0222 | - |
|
| 250 |
-
| 1.8669 | 5050 | 0.0291 | - |
|
| 251 |
-
| 1.8854 | 5100 | 0.0824 | - |
|
| 252 |
-
| 1.9039 | 5150 | 0.0563 | - |
|
| 253 |
-
| 1.9224 | 5200 | 0.0355 | - |
|
| 254 |
-
| 1.9409 | 5250 | 0.064 | - |
|
| 255 |
-
| 1.9593 | 5300 | 0.0596 | - |
|
| 256 |
-
| 1.9778 | 5350 | 0.0789 | - |
|
| 257 |
-
| 1.9963 | 5400 | 0.0901 | - |
|
| 258 |
-
| 2.0148 | 5450 | 0.0388 | - |
|
| 259 |
-
| 2.0333 | 5500 | 0.0738 | - |
|
| 260 |
-
| 2.0518 | 5550 | 0.0712 | - |
|
| 261 |
-
| 2.0702 | 5600 | 0.0825 | - |
|
| 262 |
-
| 2.0887 | 5650 | 0.0406 | - |
|
| 263 |
-
| 2.1072 | 5700 | 0.0623 | - |
|
| 264 |
-
| 2.1257 | 5750 | 0.0423 | - |
|
| 265 |
-
| 2.1442 | 5800 | 0.0566 | - |
|
| 266 |
-
| 2.1627 | 5850 | 0.0745 | - |
|
| 267 |
-
| 2.1811 | 5900 | 0.0271 | - |
|
| 268 |
-
| 2.1996 | 5950 | 0.0257 | - |
|
| 269 |
-
| 2.2181 | 6000 | 0.0347 | - |
|
| 270 |
-
| 2.2366 | 6050 | 0.0291 | - |
|
| 271 |
-
| 2.2551 | 6100 | 0.0401 | - |
|
| 272 |
-
| 2.2736 | 6150 | 0.0222 | - |
|
| 273 |
-
| 2.2921 | 6200 | 0.0217 | - |
|
| 274 |
-
| 2.3105 | 6250 | 0.0589 | - |
|
| 275 |
-
| 2.3290 | 6300 | 0.0685 | - |
|
| 276 |
-
| 2.3475 | 6350 | 0.1191 | - |
|
| 277 |
-
| 2.3660 | 6400 | 0.0626 | - |
|
| 278 |
-
| 2.3845 | 6450 | 0.0615 | - |
|
| 279 |
-
| 2.4030 | 6500 | 0.0327 | - |
|
| 280 |
-
| 2.4214 | 6550 | 0.0431 | - |
|
| 281 |
-
| 2.4399 | 6600 | 0.1037 | - |
|
| 282 |
-
| 2.4584 | 6650 | 0.0318 | - |
|
| 283 |
-
| 2.4769 | 6700 | 0.062 | - |
|
| 284 |
-
| 2.4954 | 6750 | 0.0183 | - |
|
| 285 |
-
| 2.5139 | 6800 | 0.0568 | - |
|
| 286 |
-
| 2.5323 | 6850 | 0.0581 | - |
|
| 287 |
-
| 2.5508 | 6900 | 0.0363 | - |
|
| 288 |
-
| 2.5693 | 6950 | 0.0413 | - |
|
| 289 |
-
| 2.5878 | 7000 | 0.076 | - |
|
| 290 |
-
| 2.6063 | 7050 | 0.046 | - |
|
| 291 |
-
| 2.6248 | 7100 | 0.0401 | - |
|
| 292 |
-
| 2.6433 | 7150 | 0.0552 | - |
|
| 293 |
-
| 2.6617 | 7200 | 0.0767 | - |
|
| 294 |
-
| 2.6802 | 7250 | 0.0167 | - |
|
| 295 |
-
| 2.6987 | 7300 | 0.0459 | - |
|
| 296 |
-
| 2.7172 | 7350 | 0.0306 | - |
|
| 297 |
-
| 2.7357 | 7400 | 0.0559 | - |
|
| 298 |
-
| 2.7542 | 7450 | 0.0688 | - |
|
| 299 |
-
| 2.7726 | 7500 | 0.0417 | - |
|
| 300 |
-
| 2.7911 | 7550 | 0.033 | - |
|
| 301 |
-
| 2.8096 | 7600 | 0.0404 | - |
|
| 302 |
-
| 2.8281 | 7650 | 0.0391 | - |
|
| 303 |
-
| 2.8466 | 7700 | 0.0254 | - |
|
| 304 |
-
| 2.8651 | 7750 | 0.0635 | - |
|
| 305 |
-
| 2.8835 | 7800 | 0.0739 | - |
|
| 306 |
-
| 2.9020 | 7850 | 0.0274 | - |
|
| 307 |
-
| 2.9205 | 7900 | 0.0394 | - |
|
| 308 |
-
| 2.9390 | 7950 | 0.0606 | - |
|
| 309 |
-
| 2.9575 | 8000 | 0.0098 | - |
|
| 310 |
-
| 2.9760 | 8050 | 0.0997 | - |
|
| 311 |
-
| 2.9945 | 8100 | 0.0369 | - |
|
| 312 |
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
|
| 322 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
|
| 324 |
-
|
| 325 |
-
```bibtex
|
| 326 |
-
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
| 327 |
-
doi = {10.48550/ARXIV.2209.11055},
|
| 328 |
-
url = {https://arxiv.org/abs/2209.11055},
|
| 329 |
-
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
| 330 |
-
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
| 331 |
-
title = {Efficient Few-Shot Learning Without Prompts},
|
| 332 |
-
publisher = {arXiv},
|
| 333 |
-
year = {2022},
|
| 334 |
-
copyright = {Creative Commons Attribution 4.0 International}
|
| 335 |
-
}
|
| 336 |
-
```
|
| 337 |
|
| 338 |
-
|
| 339 |
-
## Glossary
|
| 340 |
|
| 341 |
-
|
| 342 |
-
-->
|
| 343 |
|
| 344 |
-
|
| 345 |
-
## Model Card Authors
|
| 346 |
|
| 347 |
-
|
| 348 |
-
-->
|
| 349 |
|
| 350 |
-
|
| 351 |
-
## Model Card Contact
|
| 352 |
|
| 353 |
-
|
| 354 |
-
-->
|
|
|
|
| 6 |
- text-classification
|
| 7 |
- generated_from_setfit_trainer
|
| 8 |
metrics:
|
| 9 |
+
- f1
|
| 10 |
+
- accuracy
|
| 11 |
widget:
|
| 12 |
+
- text: >-
|
| 13 |
+
A combined 20 million people per year die of smoking and hunger, so
|
| 14 |
+
authorities can't seem to feed people and they allow you to buy cigarettes
|
| 15 |
+
but we are facing another lockdown for a virus that has a 99.5% survival
|
| 16 |
+
rate!!! THINK PEOPLE. LOOK AT IT LOGICALLY WITH YOUR OWN EYES.
|
| 17 |
+
- text: >-
|
| 18 |
+
Scientists do not agree on the consequences of climate change, nor is there
|
| 19 |
+
any consensus on that subject. The predictions on that from are just
|
| 20 |
+
ascientific speculation. Bring on the warming."
|
| 21 |
+
- text: >-
|
| 22 |
+
If Tam is our "top doctor"....I am going back to leaches and voodoo...just
|
| 23 |
as much science in that as the crap she spouts
|
| 24 |
+
- text: "Can she skip school by herself and sit infront of parliament? \r\n Fake emotions and just a good actor."
|
|
|
|
| 25 |
- text: my dad had huge ones..so they may be real..
|
| 26 |
pipeline_tag: text-classification
|
| 27 |
inference: false
|
|
|
|
| 40 |
- type: metric
|
| 41 |
value: 0.688144336139226
|
| 42 |
name: Metric
|
| 43 |
+
license: mit
|
| 44 |
+
language:
|
| 45 |
+
- en
|
| 46 |
---
|
| 47 |
|
| 48 |
+
# Computational Analysis of Communicative Acts for Understanding Crisis News Comment Discourses
|
| 49 |
|
| 50 |
+
The official trained models for **"Computational Analysis of Communicative Acts for Understanding Crisis News Comment Discourses"**.
|
| 51 |
|
| 52 |
+
This model is based on **SetFit** ([SetFit: Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)) and uses the **sentence-transformers/paraphrase-mpnet-base-v2** pretrained model. It has been fine-tuned on our **crisis narratives dataset**.
|
| 53 |
|
| 54 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
+
### Model Information
|
| 57 |
+
|
| 58 |
+
- **Architecture:** SetFit with sentence-transformers/paraphrase-mpnet-base-v2
|
| 59 |
+
- **Task:** Multi-label classification for communicative act actions
|
| 60 |
+
- **Classes:**
|
| 61 |
+
- `informing statement`
|
| 62 |
+
- `challenge`
|
| 63 |
+
- `accusation`
|
| 64 |
+
- `rejection`
|
| 65 |
+
- `appreciation`
|
| 66 |
+
- `request`
|
| 67 |
+
- `question`
|
| 68 |
+
- `acceptance`
|
| 69 |
+
- `apology`
|
| 70 |
|
| 71 |
+
---
|
| 72 |
|
| 73 |
+
### How to Use the Model
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
You can find the code to fine-tune this model and detailed instructions in the following GitHub repository:
|
| 76 |
+
[Acts in Crisis Narratives - SetFit Fine-Tuning Notebook](https://github.com/Aalto-CRAI-CIS/Acts-in-crisis-narratives/blob/main/few_shot_learning/SetFit.ipynb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
+
#### Steps to Load and Use the Model:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
+
1. Install the SetFit library:
|
| 81 |
+
```bash
|
| 82 |
+
pip install setfit
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
2. Load the model and run inference:
|
| 86 |
+
```python
|
| 87 |
+
from setfit import SetFitModel
|
| 88 |
|
| 89 |
+
# Download from the 🤗 Hub
|
| 90 |
+
model = SetFitModel.from_pretrained("CrisisNarratives/setfit-9classes-multi_label")
|
| 91 |
+
|
| 92 |
+
# Run inference
|
| 93 |
+
preds = model("I'm sorry.")
|
| 94 |
+
```
|
| 95 |
|
| 96 |
+
For detailed instructions, refer to the GitHub repository linked above.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
+
---
|
|
|
|
| 99 |
|
| 100 |
+
### Citation
|
|
|
|
| 101 |
|
| 102 |
+
If you use this model in your work, please cite:
|
|
|
|
| 103 |
|
| 104 |
+
##### TO BE ADDED.
|
|
|
|
| 105 |
|
| 106 |
+
### Questions or Feedback?
|
|
|
|
| 107 |
|
| 108 |
+
For questions or feedback, please reach out via our [contact form](mailto:[email protected]).
|
|
|