Spaces:
Running
Running
nit: title height
Browse files
app.py
CHANGED
@@ -158,7 +158,7 @@ def plot_model_stats(model_name: str) -> tuple[plt.Figure, str, str]:
|
|
158 |
# Add central shared title for model name
|
159 |
fig.suptitle(f'{model_name.lower()}',
|
160 |
fontsize=32, weight='bold', color='#CCCCCC',
|
161 |
-
fontfamily='monospace', y=
|
162 |
|
163 |
# Clean layout with padding and space for central title
|
164 |
plt.tight_layout()
|
@@ -252,12 +252,13 @@ def create_summary_page() -> plt.Figure:
|
|
252 |
y_nvidia_bar = y_base + 0.97 # NVIDIA bar
|
253 |
|
254 |
# Model name centered above the AMD bar
|
255 |
-
|
|
|
|
|
256 |
ha='center', va='center', color='#FFFFFF',
|
257 |
fontsize=20, fontfamily='monospace', fontweight='bold')
|
258 |
|
259 |
# AMD label and bar on the same level
|
260 |
-
left_0 = 10
|
261 |
if amd_total > 0:
|
262 |
ax.text(left_0 - 2, y_amd_bar, "AMD",
|
263 |
ha='right', va='center', color='#CCCCCC',
|
@@ -267,13 +268,13 @@ def create_summary_page() -> plt.Figure:
|
|
267 |
left = left_0
|
268 |
for category in ['passed', 'failed', 'skipped', 'error']:
|
269 |
if amd_stats[category] > 0:
|
270 |
-
width = amd_stats[category] / amd_total *
|
271 |
ax.barh(y_amd_bar, width, left=left, height=0.45,
|
272 |
color=colors[category], alpha=0.9)
|
273 |
if width > 4:
|
274 |
ax.text(left + width/2, y_amd_bar, str(amd_stats[category]),
|
275 |
ha='center', va='center', color='black',
|
276 |
-
fontweight='bold', fontsize=
|
277 |
left += width
|
278 |
|
279 |
# NVIDIA label and bar on the same level
|
@@ -286,13 +287,13 @@ def create_summary_page() -> plt.Figure:
|
|
286 |
left = left_0
|
287 |
for category in ['passed', 'failed', 'skipped', 'error']:
|
288 |
if nvidia_stats[category] > 0:
|
289 |
-
width = nvidia_stats[category] / nvidia_total *
|
290 |
ax.barh(y_nvidia_bar, width, left=left, height=0.45,
|
291 |
color=colors[category], alpha=0.9)
|
292 |
if width > 4:
|
293 |
ax.text(left + width/2, y_nvidia_bar, str(nvidia_stats[category]),
|
294 |
ha='center', va='center', color='black',
|
295 |
-
fontweight='bold', fontsize=
|
296 |
left += width
|
297 |
|
298 |
# Style the axes to be completely invisible and span full width
|
|
|
158 |
# Add central shared title for model name
|
159 |
fig.suptitle(f'{model_name.lower()}',
|
160 |
fontsize=32, weight='bold', color='#CCCCCC',
|
161 |
+
fontfamily='monospace', y=1)
|
162 |
|
163 |
# Clean layout with padding and space for central title
|
164 |
plt.tight_layout()
|
|
|
252 |
y_nvidia_bar = y_base + 0.97 # NVIDIA bar
|
253 |
|
254 |
# Model name centered above the AMD bar
|
255 |
+
left_0 = 8
|
256 |
+
bar_length = 92
|
257 |
+
ax.text(bar_length / 2 + left_0, y_model_name, f"{model_name.lower()}",
|
258 |
ha='center', va='center', color='#FFFFFF',
|
259 |
fontsize=20, fontfamily='monospace', fontweight='bold')
|
260 |
|
261 |
# AMD label and bar on the same level
|
|
|
262 |
if amd_total > 0:
|
263 |
ax.text(left_0 - 2, y_amd_bar, "AMD",
|
264 |
ha='right', va='center', color='#CCCCCC',
|
|
|
268 |
left = left_0
|
269 |
for category in ['passed', 'failed', 'skipped', 'error']:
|
270 |
if amd_stats[category] > 0:
|
271 |
+
width = amd_stats[category] / amd_total * bar_length
|
272 |
ax.barh(y_amd_bar, width, left=left, height=0.45,
|
273 |
color=colors[category], alpha=0.9)
|
274 |
if width > 4:
|
275 |
ax.text(left + width/2, y_amd_bar, str(amd_stats[category]),
|
276 |
ha='center', va='center', color='black',
|
277 |
+
fontweight='bold', fontsize=12, fontfamily='monospace')
|
278 |
left += width
|
279 |
|
280 |
# NVIDIA label and bar on the same level
|
|
|
287 |
left = left_0
|
288 |
for category in ['passed', 'failed', 'skipped', 'error']:
|
289 |
if nvidia_stats[category] > 0:
|
290 |
+
width = nvidia_stats[category] / nvidia_total * bar_length
|
291 |
ax.barh(y_nvidia_bar, width, left=left, height=0.45,
|
292 |
color=colors[category], alpha=0.9)
|
293 |
if width > 4:
|
294 |
ax.text(left + width/2, y_nvidia_bar, str(nvidia_stats[category]),
|
295 |
ha='center', va='center', color='black',
|
296 |
+
fontweight='bold', fontsize=12, fontfamily='monospace')
|
297 |
left += width
|
298 |
|
299 |
# Style the axes to be completely invisible and span full width
|