andrewzamp commited on
Commit
e493bfa
·
1 Parent(s): f90fa32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -83,8 +83,8 @@ def make_prediction(image, taxonomic_decision, taxonomic_level):
83
  current_level_index += 1 # Move to the next taxonomic level
84
 
85
  # Check if a valid prediction was made
86
- if current_level_index == len(taxonomic_levels):
87
- return "<h1 style='font-weight: bold;'>Unknown animal</h1>" # No valid predictions met the confidence criteria
88
 
89
  # Get the predicted class name for the top prediction
90
  predicted_class_index = np.argmax(aggregated_predictions)
 
83
  current_level_index += 1 # Move to the next taxonomic level
84
 
85
  # Check if a valid prediction was made
86
+ if current_level_index == len(taxonomic_levels):
87
+ return "<h1 style='font-weight: bold;'>Unknown animal</h1>" # No valid predictions met the confidence criteria
88
 
89
  # Get the predicted class name for the top prediction
90
  predicted_class_index = np.argmax(aggregated_predictions)