Abhaykoul commited on
Commit
6c77e9f
1 Parent(s): b28a3b4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -24,22 +24,22 @@ To use the emo-Classification model, you can utilize the Hugging Face Transforme
24
  from transformers import pipeline
25
 
26
  # Initialize the classifier
27
- classifier = pipeline(task="text-classification", model="Abhaykoul/emo-Classification", top_k=1)
28
 
29
- # Define the sentence to analyze
30
  sentences = ["I am not having a great day"]
31
 
32
  # Get the model output
33
  model_outputs = classifier(sentences)
34
 
35
  # Print the top emotion (first one in the list)
36
- print(f"Top emotion: {model_outputs[0][0]['label']} (Score: {model_outputs[0][0]['score']:.4f})")
37
  ```
38
 
39
  ### Example Input and Output
40
 
41
  - **Input**: `"I am not having a great day"`
42
- - **Output**: `Top emotion: <emotion_label> (Score: <score>)`
43
 
44
  ## Installation
45
 
 
24
  from transformers import pipeline
25
 
26
  # Initialize the classifier
27
+ classifier = pipeline(task="text-classification", model="AI4free/emo-Classification", top_k=1)
28
 
29
+ # Define the sentence to analyze# Define the sentence to analyze
30
  sentences = ["I am not having a great day"]
31
 
32
  # Get the model output
33
  model_outputs = classifier(sentences)
34
 
35
  # Print the top emotion (first one in the list)
36
+ print(f"emotion: {model_outputs[0][0]['label']} (Score: {model_outputs[0][0]['score']:.4f})")
37
  ```
38
 
39
  ### Example Input and Output
40
 
41
  - **Input**: `"I am not having a great day"`
42
+ - **Output**: `emotion: <emotion_label> (Score: <score>)`
43
 
44
  ## Installation
45