XuehangCang commited on
Commit
4d824ff
verified
1 Parent(s): 5b7c37b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -0
README.md CHANGED
@@ -18,6 +18,28 @@ base_model:
18
 
19
  - Problem type: Text Classification
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  ## Validation Metrics
22
  loss: 0.13341853022575378
23
 
 
18
 
19
  - Problem type: Text Classification
20
 
21
+ # Request Example
22
+ ```Python
23
+ from transformers import pipeline
24
+
25
+
26
+ emotion_classifier = pipeline("text-classification", model="XuehangCang/Emotion-Classification")
27
+
28
+
29
+ texts = [
30
+ "I'm so happy today!",
31
+ "This is really sad.",
32
+ "I'm a bit nervous about what's going to happen.",
33
+ "This news makes me angry."
34
+ ]
35
+
36
+ for text in texts:
37
+ result = emotion_classifier(text)
38
+ # 鎵撳嵃鍒嗙被缁撴灉
39
+ print(f"Text: {text}")
40
+ print(f"Emotion classification result: {result}\n")
41
+ ```
42
+
43
  ## Validation Metrics
44
  loss: 0.13341853022575378
45