tonyliu404 commited on
Commit
a6b6017
·
verified ·
1 Parent(s): 9f45bc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -239,7 +239,7 @@ def classifyImage(input_image):
239
  print(f"Predictions: {predictions}")
240
 
241
  # Sort predictions to get top 5
242
- top_indices = np.argsort(predictions)[-5:][::-1]
243
 
244
  # Prepare the top 5 predictions with their class names and percentages
245
  top_predictions = [(class_names[i], predictions[i] * 100) for i in top_indices]
 
239
  print(f"Predictions: {predictions}")
240
 
241
  # Sort predictions to get top 5
242
+ top_indices = np.argsort(predictions)[-5:]
243
 
244
  # Prepare the top 5 predictions with their class names and percentages
245
  top_predictions = [(class_names[i], predictions[i] * 100) for i in top_indices]