limitedonly41 commited on
Commit
bb63b6f
·
verified ·
1 Parent(s): 300dc3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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