justinkay
commited on
Commit
·
1dd112b
1
Parent(s):
ec209fa
orange
Browse files
app.py
CHANGED
|
@@ -477,9 +477,9 @@ def create_accuracy_bar_chart():
|
|
| 477 |
|
| 478 |
fig, ax = plt.subplots(figsize=(8, 2.8), dpi=150)
|
| 479 |
|
| 480 |
-
# Create colors array - highlight the best model with
|
| 481 |
-
colors = ['#
|
| 482 |
-
bars = ax.bar(range(len(model_labels)), accuracies, color=colors, alpha=0.
|
| 483 |
|
| 484 |
# Add text above the highest bar
|
| 485 |
ax.text(best_idx, accuracies[best_idx] + 0.0025, 'True best model',
|
|
@@ -495,8 +495,10 @@ def create_accuracy_bar_chart():
|
|
| 495 |
for i, (bar, acc) in enumerate(zip(bars, accuracies)):
|
| 496 |
# Position text in the middle of the visible part of the bar
|
| 497 |
text_y = (y_min + acc) / 2
|
|
|
|
|
|
|
| 498 |
ax.text(i, text_y, f'{acc:.3f}',
|
| 499 |
-
ha='center', va='center', fontsize=10, fontweight='bold', color=
|
| 500 |
|
| 501 |
# Set x-axis labels and ticks
|
| 502 |
ax.set_xticks(range(len(model_labels)))
|
|
|
|
| 477 |
|
| 478 |
fig, ax = plt.subplots(figsize=(8, 2.8), dpi=150)
|
| 479 |
|
| 480 |
+
# Create colors array - highlight the best model with dark reddish orange, others soft pink
|
| 481 |
+
colors = ['#F8481C' if i == best_idx else '#F8BBD0' for i in range(len(model_labels))]
|
| 482 |
+
bars = ax.bar(range(len(model_labels)), accuracies, color=colors, alpha=0.85)
|
| 483 |
|
| 484 |
# Add text above the highest bar
|
| 485 |
ax.text(best_idx, accuracies[best_idx] + 0.0025, 'True best model',
|
|
|
|
| 495 |
for i, (bar, acc) in enumerate(zip(bars, accuracies)):
|
| 496 |
# Position text in the middle of the visible part of the bar
|
| 497 |
text_y = (y_min + acc) / 2
|
| 498 |
+
# Use black text for all bars
|
| 499 |
+
text_color = '#000000'
|
| 500 |
ax.text(i, text_y, f'{acc:.3f}',
|
| 501 |
+
ha='center', va='center', fontsize=10, fontweight='bold', color=text_color)
|
| 502 |
|
| 503 |
# Set x-axis labels and ticks
|
| 504 |
ax.set_xticks(range(len(model_labels)))
|