update chart text
Browse files
app.py
CHANGED
@@ -61,12 +61,11 @@ def draw_bar_chart(data: dict[str, list[str | float]]):
|
|
61 |
fig, ax = plt.subplots(figsize=(8, 6))
|
62 |
ax.bar(classes, probabilities, color="skyblue")
|
63 |
|
64 |
-
ax.set_xlabel("
|
65 |
-
ax.set_ylabel("
|
66 |
-
ax.set_title("Class Probabilities")
|
67 |
|
68 |
for i, prob in enumerate(probabilities):
|
69 |
-
ax.text(i, prob + 0.01, f"{prob:.2f}", ha="center", va="bottom")
|
70 |
|
71 |
fig.tight_layout()
|
72 |
|
|
|
61 |
fig, ax = plt.subplots(figsize=(8, 6))
|
62 |
ax.bar(classes, probabilities, color="skyblue")
|
63 |
|
64 |
+
ax.set_xlabel("類別")
|
65 |
+
ax.set_ylabel("機率 (%)")
|
|
|
66 |
|
67 |
for i, prob in enumerate(probabilities):
|
68 |
+
ax.text(i, prob + 0.01, f"{prob:.2f}%", ha="center", va="bottom")
|
69 |
|
70 |
fig.tight_layout()
|
71 |
|