ksirts commited on
Commit
ede5845
·
1 Parent(s): 994cfe5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -5
README.md CHANGED
@@ -34,19 +34,40 @@ It achieves the following results on the test set:
34
  - Loss: 2.0552
35
  - Accuracy: 0.8329
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  ## Model description
38
 
39
- A single linear layer classifier is fit on top of the last layer [CLS] token representation. The model is fully fine-tuned during training.
40
 
41
  ## Intended uses & limitations
42
 
43
- This model is intended to be used as it is. It can be used to predict nine rubric categories of Estonian texts.
44
-
45
- We do not guarantee that the model is useful for anything or that the predictions are accurate on new data.
46
 
47
 
48
  ## Citation information
49
- If you use this model, please cite
50
 
51
  ```
52
  @inproceedings{tanvir2021estbert,
 
34
  - Loss: 2.0552
35
  - Accuracy: 0.8329
36
 
37
+ ## How to use?
38
+
39
+ You can use this model with the Transformers pipeline for text classification.
40
+
41
+ ```
42
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
43
+ from transformers import pipeline
44
+
45
+ tokenizer = AutoTokenizer.from_pretrained("tartuNLP/EstBERT128_Rubric")
46
+ model = AutoModelForSequenceClassification.from_pretrained("tartuNLP/EstBERT128_Rubric")
47
+
48
+ nlp = pipeline("ner", model=bertner, tokenizer=tokenizer)
49
+ text = "Kaia Kanepi (WTA 57.) langes USA-s Charlestonis toimuval WTA 500 kategooria tenniseturniiril konkurentsist kaheksandikfinaalis, kaotades poolatarile Magda Linette'ile (WTA 64.) 3 : 6, 6 : 4, 2 : 6."
50
+ result = nlp(text)
51
+
52
+ print(result)
53
+ ```
54
+
55
+ ```
56
+ [{'label': 'SPORT', 'score': 0.9999998807907104}]
57
+ ```
58
+
59
+
60
  ## Model description
61
 
62
+ A single linear layer classifier is fit on top of the last layer [CLS] token representation of the EstBERT model. The model is fully fine-tuned during training.
63
 
64
  ## Intended uses & limitations
65
 
66
+ This model is intended to be used as it is. We hope that it can prove to be useful to somebody but we do not guarantee that the model is useful for anything or that the predictions are accurate on new data.
 
 
67
 
68
 
69
  ## Citation information
70
+ If you use this model, please cite:
71
 
72
  ```
73
  @inproceedings{tanvir2021estbert,