CosmickVisions commited on
Commit
1465dbd
·
verified ·
1 Parent(s): 95e0685

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -760,16 +760,15 @@ elif app_mode == "Model Training":
760
  #Confusion Matrix
761
 
762
  conf_matrix = confusion_matrix(y_test, y_pred)
763
-
764
- #Heatmap
765
  fig_conf, ax_conf = plt.subplots()
766
- sns.heatmap(conf_matrix, annot=True, fmt='d', cmap='Blues', ax_conf)
767
  ax_conf.set_xlabel('Predicted Labels')
768
  ax_conf.set_ylabel('True Labels')
769
  ax_conf.set_title('Confusion Matrix')
770
  st.pyplot(fig_conf)
771
 
772
-
773
  #Added section for model visualization
774
  st.subheader("Model Visualization")
775
  #Use conditional to make sure that everything only executes when the data set is trained and not outside of it.
 
760
  #Confusion Matrix
761
 
762
  conf_matrix = confusion_matrix(y_test, y_pred)
763
+
764
+ # Assuming conf_matrix is your confusion matrix
765
  fig_conf, ax_conf = plt.subplots()
766
+ sns.heatmap(conf_matrix, annot=True, fmt='d', cmap='Blues', ax=ax_conf) # Corrected named argument
767
  ax_conf.set_xlabel('Predicted Labels')
768
  ax_conf.set_ylabel('True Labels')
769
  ax_conf.set_title('Confusion Matrix')
770
  st.pyplot(fig_conf)
771
 
 
772
  #Added section for model visualization
773
  st.subheader("Model Visualization")
774
  #Use conditional to make sure that everything only executes when the data set is trained and not outside of it.