Update README.md
Browse files
README.md
CHANGED
|
@@ -128,7 +128,7 @@ config = DebertaV2Config.from_pretrained(
|
|
| 128 |
model = CustomModel(config=config, sentiment_dim=3, num_labels=2).from_pretrained(model_name)
|
| 129 |
|
| 130 |
def classify_subjectivity(text: str):
|
| 131 |
-
#
|
| 132 |
dist = sent_pipe(text)[0]
|
| 133 |
pos = next(d["score"] for d in dist if d["label"] == "positive")
|
| 134 |
neu = next(d["score"] for d in dist if d["label"] == "neutral")
|
|
|
|
| 128 |
model = CustomModel(config=config, sentiment_dim=3, num_labels=2).from_pretrained(model_name)
|
| 129 |
|
| 130 |
def classify_subjectivity(text: str):
|
| 131 |
+
# get full sentiment distribution
|
| 132 |
dist = sent_pipe(text)[0]
|
| 133 |
pos = next(d["score"] for d in dist if d["label"] == "positive")
|
| 134 |
neu = next(d["score"] for d in dist if d["label"] == "neutral")
|