5roop commited on
Commit
8674a69
1 Parent(s): 0b1cdbe

Add use example to model card.

Browse files
Files changed (1) hide show
  1. README.md +18 -0
README.md CHANGED
@@ -33,7 +33,25 @@ model_args = {
33
  | bcms-bertic-parlasent-bcs-ter | 0.7941 ± 0.0101 |
34
  | bcms-bertic-parlasent-bcs-bi (this model) | 0.8999 ± 0.012 |
35
 
 
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  ## Citation
39
 
 
33
  | bcms-bertic-parlasent-bcs-ter | 0.7941 ± 0.0101 |
34
  | bcms-bertic-parlasent-bcs-bi (this model) | 0.8999 ± 0.012 |
35
 
36
+ ## Use example with `simpletransformers==0.63.7`
37
 
38
+ ```python
39
+ from simpletransformers.classification import ClassificationModel
40
+
41
+ model = ClassificationModel("electra", "classla/bcms-bertic-parlasent-bcs-bi")
42
+
43
+ predictions, logits = model.predict([
44
+ "Đački autobusi moraju da voze svaki dan",
45
+ "Vi niste normalni"
46
+ ]
47
+ )
48
+
49
+ predictions
50
+ # Output: array([1, 0])
51
+
52
+ [model.config.id2label[i] for i in predictions]
53
+ # Output: ['Other', 'Negative']
54
+ ```
55
 
56
  ## Citation
57