CosmickVisions commited on
Commit
aab0a5b
·
verified ·
1 Parent(s): 760d90d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -25,6 +25,7 @@ import requests
25
  import asyncio
26
  from io import BytesIO
27
  import base64
 
28
  import time
29
  from sklearn.cluster import KMeans
30
  import scipy.stats as stats
@@ -766,9 +767,9 @@ elif app_mode == "Model Training":
766
 
767
  conf_matrix = confusion_matrix(y_test, y_pred)
768
 
769
- #Heatmap
770
  fig_conf, ax_conf = plt.subplots()
771
- sns.heatmap(conf_matrix, annot=True, fmt='d', cmap='Blues', ax_conf)
772
  ax_conf.set_xlabel('Predicted Labels')
773
  ax_conf.set_ylabel('True Labels')
774
  ax_conf.set_title('Confusion Matrix')
 
25
  import asyncio
26
  from io import BytesIO
27
  import base64
28
+ import seaborn as sns
29
  import time
30
  from sklearn.cluster import KMeans
31
  import scipy.stats as stats
 
767
 
768
  conf_matrix = confusion_matrix(y_test, y_pred)
769
 
770
+ # Assuming conf_matrix is your confusion matrix
771
  fig_conf, ax_conf = plt.subplots()
772
+ sns.heatmap(conf_matrix, annot=True, fmt='d', cmap='Blues', ax=ax_conf)
773
  ax_conf.set_xlabel('Predicted Labels')
774
  ax_conf.set_ylabel('True Labels')
775
  ax_conf.set_title('Confusion Matrix')