z-dickson commited on
Commit
10468f3
1 Parent(s): 23aef05

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -0
README.md CHANGED
@@ -27,6 +27,20 @@ It achieves the following results on the evaluation set:
27
  - Validation Sparse Categorical Accuracy: 0.6434
28
  - Epoch: 4
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  ### Training hyperparameters
31
 
32
  The following hyperparameters were used during training:
 
27
  - Validation Sparse Categorical Accuracy: 0.6434
28
  - Epoch: 4
29
 
30
+
31
+ ```
32
+ {python}
33
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification, TextClassificationPipeline
34
+
35
+ tokenizer = tokenizer = AutoTokenizer.from_pretrained("z-dickson/multilingual_sentiment_newspaper_headlines")
36
+ m1 = TFAutoModelForSequenceClassification.from_pretrained("z-dickson/multilingual_sentiment_newspaper_headlines")
37
+ sentiment_classifier = TextClassificationPipeline(tokenizer=tokenizer, model=m1)
38
+
39
+ sentiment_classifier('Brazylia: Bolsonaro wci±ż nie uznał porażki. Jego zwolennicy blokuj± autostrady')
40
+ [{'label': 'negative, 0', 'score': 0.9989686012268066}]
41
+ ```
42
+
43
+
44
  ### Training hyperparameters
45
 
46
  The following hyperparameters were used during training: