rfahlevih commited on
Commit
bcfa65d
·
verified ·
1 Parent(s): 3d15873
Files changed (1) hide show
  1. README.md +3 -2
README.md CHANGED
@@ -18,7 +18,6 @@ This model is trained from a dataset of 10,000 review data on Tokopedia and Shop
18
  ### How to use
19
  You can use this model with the following steps:
20
  ```python
21
- >>> from transformers import pipeline
22
  >>> from transformers import AutoModelForSequenceClassification, AutoTokenizer
23
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
24
 
@@ -32,5 +31,7 @@ outputs = model(**inputs)
32
  logits = outputs.logits
33
  predicted_class = logits.argmax(dim=-1).item()
34
 
35
- print(f"Predicted class: {predicted_class}")
 
 
36
  ```
 
18
  ### How to use
19
  You can use this model with the following steps:
20
  ```python
 
21
  >>> from transformers import AutoModelForSequenceClassification, AutoTokenizer
22
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
23
 
 
31
  logits = outputs.logits
32
  predicted_class = logits.argmax(dim=-1).item()
33
 
34
+ sentiment = "Negative" if predicted_class == 0 else "Positive"
35
+
36
+ print(f"Predicted class: {predicted_class} - Sentimen: {sentiment}")
37
  ```