Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,7 +92,8 @@ def run_inference(image, device, valid_ds):
|
|
| 92 |
predicted_class = torch.argmax(prediction, dim=1).item()
|
| 93 |
value_predicted = list(valid_ds.class_to_idx.keys())[list(valid_ds.class_to_idx.values()).index(predicted_class)]
|
| 94 |
|
| 95 |
-
return f"Predicted Class: {value_predicted}, {predicted_class}"
|
|
|
|
| 96 |
|
| 97 |
|
| 98 |
# # Preprocess the image using the feature extractor
|
|
|
|
| 92 |
predicted_class = torch.argmax(prediction, dim=1).item()
|
| 93 |
value_predicted = list(valid_ds.class_to_idx.keys())[list(valid_ds.class_to_idx.values()).index(predicted_class)]
|
| 94 |
|
| 95 |
+
# return f"Predicted Class: {value_predicted}, {predicted_class}"
|
| 96 |
+
return value_predicted
|
| 97 |
|
| 98 |
|
| 99 |
# # Preprocess the image using the feature extractor
|