fix[bert]: Typo
Browse files- ml-service/classifier.py +1 -1
ml-service/classifier.py
CHANGED
@@ -13,7 +13,7 @@ class Classifier:
|
|
13 |
labels = ["Negative", "Neutral", "Positive"]
|
14 |
encoded_input = self.tokenizer(text, return_tensors='pt')
|
15 |
output = self.model(**encoded_input)
|
16 |
-
scores = output[0][0]
|
17 |
scores = softmax(scores)
|
18 |
ranking = np.argsort(scores)
|
19 |
ranking = ranking[::-1]
|
|
|
13 |
labels = ["Negative", "Neutral", "Positive"]
|
14 |
encoded_input = self.tokenizer(text, return_tensors='pt')
|
15 |
output = self.model(**encoded_input)
|
16 |
+
scores = output[0][0].detach().numpy()
|
17 |
scores = softmax(scores)
|
18 |
ranking = np.argsort(scores)
|
19 |
ranking = ranking[::-1]
|