Spaces:
Runtime error
Runtime error
Commit ·
1401e1a
1
Parent(s): edabf79
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,7 +56,7 @@ def image_classifier(input_image, top_classes=3, show_cam=True, target_layers=[2
|
|
| 56 |
confidences = {classes[i]: float(o[i]) for i in range(10)}
|
| 57 |
_, label = torch.max(output, 1)
|
| 58 |
|
| 59 |
-
confidences.sort(key=lambda x: x[1], reverse=True)
|
| 60 |
confidences = OrderedDict(confidences[:top_classes])
|
| 61 |
#label = torch.argmax(output).item()
|
| 62 |
|
|
|
|
| 56 |
confidences = {classes[i]: float(o[i]) for i in range(10)}
|
| 57 |
_, label = torch.max(output, 1)
|
| 58 |
|
| 59 |
+
#confidences.sort(key=lambda x: x[1], reverse=True)
|
| 60 |
confidences = OrderedDict(confidences[:top_classes])
|
| 61 |
#label = torch.argmax(output).item()
|
| 62 |
|