MarkusWesterwald
commited on
Commit
•
f9f1643
1
Parent(s):
a50b214
Update handler.py
Browse files- handler.py +4 -4
handler.py
CHANGED
@@ -84,7 +84,7 @@ class EndpointHandler:
|
|
84 |
# run normal prediction
|
85 |
scores = self.model.predict_proba(inputs)[0]
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
84 |
# run normal prediction
|
85 |
scores = self.model.predict_proba(inputs)[0]
|
86 |
|
87 |
+
return [
|
88 |
+
{"label": self.id2label[i], "score": score.item()}
|
89 |
+
for i, score in enumerate(scores)
|
90 |
+
]
|