Spaces:
Runtime error
Runtime error
Commit
·
c0068cb
1
Parent(s):
f3dfc85
Changed "effnet_class_names" to "class_names"
Browse files
app.py
CHANGED
|
@@ -37,8 +37,8 @@ def predict(img) -> Tuple[Dict, float]:
|
|
| 37 |
pred_probs = torch.softmax(pred_logits, dim = 1)
|
| 38 |
|
| 39 |
# create a prediction label and pred prob dictionary
|
| 40 |
-
pred_labels_and_probs = {
|
| 41 |
-
for i in range(len(
|
| 42 |
|
| 43 |
#calculate pred time
|
| 44 |
end_time = timer()
|
|
|
|
| 37 |
pred_probs = torch.softmax(pred_logits, dim = 1)
|
| 38 |
|
| 39 |
# create a prediction label and pred prob dictionary
|
| 40 |
+
pred_labels_and_probs = {class_names[i]: float(pred_probs[0][i])
|
| 41 |
+
for i in range(len(class_names))}
|
| 42 |
|
| 43 |
#calculate pred time
|
| 44 |
end_time = timer()
|