Spaces:
Sleeping
Sleeping
Sagar Bisht
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,7 +28,8 @@ def predict(img)->Tuple[Dict, float]:
|
|
| 28 |
with torch.inference_mode():
|
| 29 |
pred_probs=torch.softmax(effnetb2(img), dim=1)
|
| 30 |
|
| 31 |
-
pred_labels_and_probs={class_names[i]: float(pred_probs[0][i] for i in range(len(class_names))
|
|
|
|
| 32 |
pred_time=round(timer()-start_time,5)
|
| 33 |
return pred_labels_and_probs, pred_time
|
| 34 |
|
|
|
|
| 28 |
with torch.inference_mode():
|
| 29 |
pred_probs=torch.softmax(effnetb2(img), dim=1)
|
| 30 |
|
| 31 |
+
pred_labels_and_probs={class_names[i]: float(pred_probs[0][i]) for i in range(len(class_names))}
|
| 32 |
+
|
| 33 |
pred_time=round(timer()-start_time,5)
|
| 34 |
return pred_labels_and_probs, pred_time
|
| 35 |
|