Spidartist
commited on
Commit
·
be1fa74
1
Parent(s):
b687777
Update app.py
Browse files
app.py
CHANGED
@@ -104,7 +104,7 @@ def ant_genus_classification(image):
|
|
104 |
# preds = torch.argmax(preds, dim=1)
|
105 |
print(preds.shape)
|
106 |
|
107 |
-
confidences = {class_to_idx[i]: float(preds[i]) for i in range(len(classes))}
|
108 |
return confidences
|
109 |
# prediction = model(image)[0]
|
110 |
# prediction = prediction.tolist()
|
|
|
104 |
# preds = torch.argmax(preds, dim=1)
|
105 |
print(preds.shape)
|
106 |
|
107 |
+
confidences = {class_to_idx[i]: float(preds[0][i]) for i in range(len(classes))}
|
108 |
return confidences
|
109 |
# prediction = model(image)[0]
|
110 |
# prediction = prediction.tolist()
|