diff --git a/image_prediction/classifier/classifier.py b/image_prediction/classifier/classifier.py index d7dd316..a9164c5 100644 --- a/image_prediction/classifier/classifier.py +++ b/image_prediction/classifier/classifier.py @@ -36,7 +36,7 @@ class Classifier: ) def __format_array_prediction_format(self, prediction): - cls2prob = dict(sorted(zip(self._classes, prediction), key=itemgetter(1))) + cls2prob = dict(sorted(zip(self._classes, prediction), key=itemgetter(1), reverse=True)) most_likely = [*cls2prob][0] return {"label": most_likely, "probabilities": cls2prob}