marahim20-2 commited on
Commit
f52b2fb
·
verified ·
1 Parent(s): 4464ff1

Updated UI

Browse files

Changed Predicted class and Confidence to display as df

Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -93,10 +93,14 @@ def main():
93
  with col2:
94
  st.image(explanation_image, caption="Explanation Image", use_column_width=True)
95
 
96
- # Display prediction
97
  st.subheader("Prediction")
98
- st.write(f"Predicted Class: {predicted_class}")
99
- st.write(f"Confidence Score: {confidence_score}%")
 
 
 
 
100
 
101
  if __name__ == "__main__":
102
  main()
 
93
  with col2:
94
  st.image(explanation_image, caption="Explanation Image", use_column_width=True)
95
 
96
+ # Display prediction
97
  st.subheader("Prediction")
98
+ # Create a table for prediction results
99
+ prediction_table = pd.DataFrame({
100
+ "Predicted Class": [predicted_class],
101
+ "Confidence": [f"{confidence_score}%"]
102
+ })
103
+ st.table(prediction_table)
104
 
105
  if __name__ == "__main__":
106
  main()