ror HF Staff commited on
Commit
3c0dd4c
·
1 Parent(s): 61506bd

Better top alignment

Browse files
Files changed (2) hide show
  1. styles.css +1 -1
  2. summary_page.py +4 -4
styles.css CHANGED
@@ -442,7 +442,7 @@ h1, h2, h3, p, .markdown {
442
  /* Main content area */
443
  .main-content {
444
  background-color: #000000 !important;
445
- padding: 20px 20px 40px 20px !important;
446
  margin-left: 300px !important;
447
  height: 100vh !important;
448
  overflow-y: auto !important;
 
442
  /* Main content area */
443
  .main-content {
444
  background-color: #000000 !important;
445
+ padding: 0px 20px 40px 20px !important;
446
  margin-left: 300px !important;
447
  height: 100vh !important;
448
  overflow-y: auto !important;
summary_page.py CHANGED
@@ -86,9 +86,9 @@ def create_summary_page(df: pd.DataFrame, available_models: list[str]) -> plt.Fi
86
  col_left = col * column_width + bar_margin
87
  col_center = col * column_width + column_width / 2
88
 
89
- # Calculate vertical position for this row
90
  vertical_spacing = height_per_row
91
- y_base = (1.5 + row) * vertical_spacing
92
  y_model_name = y_base # Model name above AMD bar
93
  y_amd_bar = y_base + vertical_spacing * 0.25 # AMD bar
94
  y_nvidia_bar = y_base + vertical_spacing * 0.54 # NVIDIA bar
@@ -157,8 +157,8 @@ def create_summary_page(df: pd.DataFrame, available_models: list[str]) -> plt.Fi
157
  ax.set_yticks([])
158
  ax.yaxis.set_inverted(True)
159
 
160
- # Remove all margins to make bars span full width
161
  plt.tight_layout()
162
- plt.subplots_adjust(left=0.02, right=0.98, top=0.98, bottom=0.02)
163
 
164
  return fig
 
86
  col_left = col * column_width + bar_margin
87
  col_center = col * column_width + column_width / 2
88
 
89
+ # Calculate vertical position for this row - start from top
90
  vertical_spacing = height_per_row
91
+ y_base = (0.2 + row) * vertical_spacing # Start closer to top
92
  y_model_name = y_base # Model name above AMD bar
93
  y_amd_bar = y_base + vertical_spacing * 0.25 # AMD bar
94
  y_nvidia_bar = y_base + vertical_spacing * 0.54 # NVIDIA bar
 
157
  ax.set_yticks([])
158
  ax.yaxis.set_inverted(True)
159
 
160
+ # Remove all margins to make figure stick to top
161
  plt.tight_layout()
162
+ plt.subplots_adjust(left=0.02, right=0.98, top=1.0, bottom=0.02)
163
 
164
  return fig