asmithaaa commited on
Commit
61c7463
·
verified ·
1 Parent(s): f0305ab

Upload 1_Classification.py

Browse files
Files changed (1) hide show
  1. pages/1_Classification.py +3 -3
pages/1_Classification.py CHANGED
@@ -86,11 +86,11 @@ if uploaded_file:
86
  model = load_model(path)
87
  predictions = model.predict(img_array, verbose=0)[0]
88
 
89
- top5_indices = np.argsort(predictions)[-5:][::-1]
90
 
91
- st.markdown(f"### {model_name} - Top 5 Predictions")
92
 
93
- for idx in top5_indices:
94
  class_name = CLASS_NAMES[idx]
95
  confidence = predictions[idx]
96
  st.write(f"{class_name} — {confidence:.3f}")
 
86
  model = load_model(path)
87
  predictions = model.predict(img_array, verbose=0)[0]
88
 
89
+ top10_indices = np.argsort(predictions)[-10:][::-1]
90
 
91
+ st.markdown(f"### {model_name} - Top 10 Predictions")
92
 
93
+ for idx in top10_indices:
94
  class_name = CLASS_NAMES[idx]
95
  confidence = predictions[idx]
96
  st.write(f"{class_name} — {confidence:.3f}")