Update tokenizer
Browse files
README.md
CHANGED
|
@@ -97,19 +97,19 @@ You can use this model for text classification with the `transformers` library:
|
|
| 97 |
from transformers import pipeline
|
| 98 |
|
| 99 |
# Load the text classification pipeline
|
| 100 |
-
classifier = pipeline("text-classification", model="MatteoFasulo/mdeberta-v3-base-subjectivity-english")
|
| 101 |
|
| 102 |
# Example usage for an objective sentence
|
| 103 |
text1 = "The company reported a 10% increase in profits in the last quarter."
|
| 104 |
result1 = classifier(text1)
|
| 105 |
print(f"Text: '{text1}' Classification: {result1}")
|
| 106 |
-
# Expected output: [{'label': 'OBJ', 'score':
|
| 107 |
|
| 108 |
# Example usage for a subjective sentence
|
| 109 |
text2 = "This product is absolutely amazing and everyone should try it!"
|
| 110 |
result2 = classifier(text2)
|
| 111 |
print(f"Text: '{text2}' Classification: {result2}")
|
| 112 |
-
# Expected output: [{'label': 'SUBJ', 'score':
|
| 113 |
```
|
| 114 |
|
| 115 |
## Training procedure
|
|
|
|
| 97 |
from transformers import pipeline
|
| 98 |
|
| 99 |
# Load the text classification pipeline
|
| 100 |
+
classifier = pipeline("text-classification", model="MatteoFasulo/mdeberta-v3-base-subjectivity-english", tokenizer="microsoft/mdeberta-v3-base")
|
| 101 |
|
| 102 |
# Example usage for an objective sentence
|
| 103 |
text1 = "The company reported a 10% increase in profits in the last quarter."
|
| 104 |
result1 = classifier(text1)
|
| 105 |
print(f"Text: '{text1}' Classification: {result1}")
|
| 106 |
+
# Expected output: [{'label': 'OBJ', 'score': ...}]
|
| 107 |
|
| 108 |
# Example usage for a subjective sentence
|
| 109 |
text2 = "This product is absolutely amazing and everyone should try it!"
|
| 110 |
result2 = classifier(text2)
|
| 111 |
print(f"Text: '{text2}' Classification: {result2}")
|
| 112 |
+
# Expected output: [{'label': 'SUBJ', 'score': ...}]
|
| 113 |
```
|
| 114 |
|
| 115 |
## Training procedure
|