Arjun4707 commited on
Commit
26ea0d3
1 Parent(s): 88e0503

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -6
README.md CHANGED
@@ -30,12 +30,8 @@ It achieves the following results on the evaluation set:
30
  ## Model description
31
 
32
  Model takes text as input and outputs an predictions for one of the 6 emotions.
33
- { 0: 'sadness',
34
- 1:'joy',
35
- 2: "love",
36
- 3: "anger",
37
- 4: "fear",
38
- 5: "surprise"}
39
 
40
  ## Intended uses & limitations
41
 
@@ -45,8 +41,16 @@ Use to identify an emotion of a user from above mentioned emotions.
45
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
46
 
47
  tokenizer = AutoTokenizer.from_pretrained("Arjun4707/Distilbert-base-uncased_dair-ai_emotion")
 
48
  model = AutoModelForSequenceClassification.from_pretrained("Arjun4707/Distilbert-base-uncased_dair-ai_emotion", from_tf = True)
49
 
 
 
 
 
 
 
 
50
  ## Training and evaluation data
51
 
52
  Training data size = 16000, validation data = 2000, and test data = 2000
 
30
  ## Model description
31
 
32
  Model takes text as input and outputs an predictions for one of the 6 emotions.
33
+
34
+ [0:'anger', 1: 'fear', 2: 'joy', 3: 'love', 4: 'sadness', 5: 'surprise']
 
 
 
 
35
 
36
  ## Intended uses & limitations
37
 
 
41
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
42
 
43
  tokenizer = AutoTokenizer.from_pretrained("Arjun4707/Distilbert-base-uncased_dair-ai_emotion")
44
+
45
  model = AutoModelForSequenceClassification.from_pretrained("Arjun4707/Distilbert-base-uncased_dair-ai_emotion", from_tf = True)
46
 
47
+ example = "I am feeling low"
48
+
49
+ inputs = tokenizer(example, padding = True, return_tensors = 'pt')
50
+
51
+ output_logits = model(inputs)['logits']
52
+
53
+
54
  ## Training and evaluation data
55
 
56
  Training data size = 16000, validation data = 2000, and test data = 2000