mgyigit commited on
Commit
58b563f
·
verified ·
1 Parent(s): 6ba85f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -138,8 +138,8 @@ def generate_plot_and_explanation(benchmark_type, methods_selected, x_metric, y_
138
  # ---------------------------------------------------------------------------
139
  CUSTOM_CSS = """
140
  /* freeze first column */
141
- #leaderboard-table thead th:first-child,
142
- #leaderboard-table tbody td:first-child {
143
  position: sticky;
144
  left: 0;
145
  background: white;
@@ -147,7 +147,7 @@ CUSTOM_CSS = """
147
  }
148
 
149
  /* striped rows for readability */
150
- #leaderboard-table tbody tr:nth-child(odd) {
151
  background: #fafafa;
152
  }
153
 
@@ -155,6 +155,13 @@ CUSTOM_CSS = """
155
  #leaderboard-table td:not(:first-child) {
156
  text-align: center;
157
  }
 
 
 
 
 
 
 
158
  """
159
 
160
  # ---------------------------------------------------------------------------
@@ -223,7 +230,7 @@ with block:
223
  datatype=baseline_datatype,
224
  interactive=False,
225
  elem_id="leaderboard-table",
226
- height=600, # make table longer
227
  )
228
 
229
  # callbacks
 
138
  # ---------------------------------------------------------------------------
139
  CUSTOM_CSS = """
140
  /* freeze first column */
141
+ #leaderboard-table table tr th:first-child,
142
+ #leaderboard-table table tr td:first-child {
143
  position: sticky;
144
  left: 0;
145
  background: white;
 
147
  }
148
 
149
  /* striped rows for readability */
150
+ #leaderboard-table table tr:nth-child(odd) {
151
  background: #fafafa;
152
  }
153
 
 
155
  #leaderboard-table td:not(:first-child) {
156
  text-align: center;
157
  }
158
+
159
+ /* scrollable and taller table */
160
+ #leaderboard-table .dataframe-wrap {
161
+ max-height: 600px;
162
+ overflow-y: auto;
163
+ overflow-x: auto;
164
+ }
165
  """
166
 
167
  # ---------------------------------------------------------------------------
 
230
  datatype=baseline_datatype,
231
  interactive=False,
232
  elem_id="leaderboard-table",
233
+ # make table longer
234
  )
235
 
236
  # callbacks