Spaces:
Running
Running
Update app.py
Browse files
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 |
-
#
|
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.
|