ror HF Staff commited on
Commit
4dfd9dc
·
1 Parent(s): 1f73b46

Version 0.2

Browse files
Files changed (1) hide show
  1. app.py +27 -19
app.py CHANGED
@@ -246,43 +246,50 @@ def create_summary_page() -> plt.Figure:
246
  continue
247
 
248
  # Position for this model - tighter spacing between groups
249
- y_base = (len(MODELS) - i - 1) * 3.2
250
- y_amd_text = y_base + 2.0 # AMD label
251
- y_amd_bar = y_base + 1.5 # AMD bar
252
- y_nvidia_text = y_base + 0.8 # NVIDIA label
253
- y_nvidia_bar = y_base + 0.3 # NVIDIA bar
254
 
255
- # AMD bar and label
 
 
 
 
 
 
256
  if amd_total > 0:
257
- ax.text(0, y_amd_text, f"{model_name.lower()} - AMD",
258
- ha='left', va='center', color='#FFFFFF',
259
- fontsize=24, fontfamily='monospace', fontweight='normal')
260
 
261
- left = 0
 
262
  for category in ['passed', 'failed', 'skipped', 'error']:
263
  if amd_stats[category] > 0:
264
- width = amd_stats[category] / amd_total * 100
265
  ax.barh(y_amd_bar, width, left=left, height=0.45,
266
  color=colors[category], alpha=0.9)
267
- if width > 6:
268
  ax.text(left + width/2, y_amd_bar, str(amd_stats[category]),
269
  ha='center', va='center', color='black',
270
  fontweight='bold', fontsize=10, fontfamily='monospace')
271
  left += width
272
 
273
- # NVIDIA bar and label
274
  if nvidia_total > 0:
275
- ax.text(0, y_nvidia_text, f"{model_name.lower()} - NVIDIA",
276
- ha='left', va='center', color='#FFFFFF',
277
- fontsize=24, fontfamily='monospace', fontweight='normal')
278
 
279
- left = 0
 
280
  for category in ['passed', 'failed', 'skipped', 'error']:
281
  if nvidia_stats[category] > 0:
282
- width = nvidia_stats[category] / nvidia_total * 100
283
  ax.barh(y_nvidia_bar, width, left=left, height=0.45,
284
  color=colors[category], alpha=0.9)
285
- if width > 6:
286
  ax.text(left + width/2, y_nvidia_bar, str(nvidia_stats[category]),
287
  ha='center', va='center', color='black',
288
  fontweight='bold', fontsize=10, fontfamily='monospace')
@@ -299,6 +306,7 @@ def create_summary_page() -> plt.Figure:
299
  ax.spines['right'].set_visible(False)
300
  ax.set_xticks([])
301
  ax.set_yticks([])
 
302
 
303
  # Remove all margins to make bars span full width
304
  plt.tight_layout()
 
246
  continue
247
 
248
  # Position for this model - tighter spacing between groups
249
+ y_base = i * 2
250
+ y_model_name = y_base # Model name above AMD bar
251
+ y_amd_bar = y_base + 0.45 # AMD bar
252
+ y_nvidia_bar = y_base + 0.97 # NVIDIA bar
 
253
 
254
+ # Model name centered above the AMD bar
255
+ ax.text(50, y_model_name, f"{model_name.lower()}",
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',
264
+ fontsize=18, fontfamily='monospace', fontweight='normal')
265
 
266
+ # AMD bar starts after labels
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 * 82
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=10, fontfamily='monospace')
277
  left += width
278
 
279
+ # NVIDIA label and bar on the same level
280
  if nvidia_total > 0:
281
+ ax.text(left_0 - 2, y_nvidia_bar, "NVIDIA",
282
+ ha='right', va='center', color='#CCCCCC',
283
+ fontsize=18, fontfamily='monospace', fontweight='normal')
284
 
285
+ # NVIDIA bar starts after labels
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 * 82
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=10, fontfamily='monospace')
 
306
  ax.spines['right'].set_visible(False)
307
  ax.set_xticks([])
308
  ax.set_yticks([])
309
+ ax.yaxis.set_inverted(True)
310
 
311
  # Remove all margins to make bars span full width
312
  plt.tight_layout()