vdmbrsv commited on
Commit
0a0a7bc
·
verified ·
1 Parent(s): 3e5ca4f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -1
README.md CHANGED
@@ -90,7 +90,24 @@ Ideal for:
90
 
91
  ## How to Use
92
 
93
- Below is a Python example on how to use the multilingual sentiment model:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  ```python
96
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
 
90
 
91
  ## How to Use
92
 
93
+ Using pipelines, it takes only 4 lines:
94
+
95
+ ```pyython
96
+ from transformers import pipeline
97
+
98
+ # Load the classification pipeline with the specified model
99
+ pipe = pipeline("text-classification", model="tabularisai/multilingual-sentiment-analysis")
100
+
101
+ # Classify a new sentence
102
+ sentence = "I love this product! It's amazing and works perfectly."
103
+ result = pipe(sentence)
104
+
105
+ # Print the result
106
+ print(result)
107
+ ```
108
+
109
+ Below is a Python example on how to use the multilingual sentiment model without pipelines:
110
+
111
 
112
  ```python
113
  from transformers import AutoTokenizer, AutoModelForSequenceClassification