Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -87,7 +87,8 @@ def plot_confusion_matrix_beamPred(cm, classes, title, save_path, theme='Dark'):
|
|
87 |
plt.figure(figsize=(10, 10))
|
88 |
|
89 |
# Plot the confusion matrix with a colormap compatible for the mode
|
90 |
-
sns.heatmap(cm, cmap=cmap, cbar=True)
|
|
|
91 |
|
92 |
# Add F1-score to the title
|
93 |
plt.title(f"{title}\nF1 Score: {avg_f1:.3f}", color=text_color, fontsize=23)
|
@@ -96,8 +97,8 @@ def plot_confusion_matrix_beamPred(cm, classes, title, save_path, theme='Dark'):
|
|
96 |
plt.xticks(tick_marks, classes, color=text_color, fontsize=14) # Adjust text color based on the mode
|
97 |
plt.yticks(tick_marks, classes, color=text_color, fontsize=14) # Adjust text color based on the mode
|
98 |
|
99 |
-
plt.ylabel('True label', color=text_color, fontsize=
|
100 |
-
plt.xlabel('Predicted label', color=text_color, fontsize=
|
101 |
plt.tight_layout()
|
102 |
|
103 |
# Save the plot as an image
|
|
|
87 |
plt.figure(figsize=(10, 10))
|
88 |
|
89 |
# Plot the confusion matrix with a colormap compatible for the mode
|
90 |
+
g = sns.heatmap(cm, cmap=cmap, cbar=True)
|
91 |
+
g.axes.get_yticklabels().set_color(text_color)
|
92 |
|
93 |
# Add F1-score to the title
|
94 |
plt.title(f"{title}\nF1 Score: {avg_f1:.3f}", color=text_color, fontsize=23)
|
|
|
97 |
plt.xticks(tick_marks, classes, color=text_color, fontsize=14) # Adjust text color based on the mode
|
98 |
plt.yticks(tick_marks, classes, color=text_color, fontsize=14) # Adjust text color based on the mode
|
99 |
|
100 |
+
plt.ylabel('True label', color=text_color, fontsize=20)
|
101 |
+
plt.xlabel('Predicted label', color=text_color, fontsize=20)
|
102 |
plt.tight_layout()
|
103 |
|
104 |
# Save the plot as an image
|