ggcristian commited on
Commit
9b52407
·
1 Parent(s): 59a97a5

Center align metrics, left align the rest

Browse files
Files changed (2) hide show
  1. app.py +3 -2
  2. style/css_html_js.py +35 -0
app.py CHANGED
@@ -281,13 +281,14 @@ with gr.Blocks(
281
  interactive=False,
282
  column_widths=[
283
  "7%",
284
- "29%",
285
  "17%",
286
  "9%",
287
  "12%",
288
  "9%",
289
- "17%",
290
  ],
 
291
  )
292
 
293
  with gr.Tab("Plot View"):
 
281
  interactive=False,
282
  column_widths=[
283
  "7%",
284
+ "23%",
285
  "17%",
286
  "9%",
287
  "12%",
288
  "9%",
289
+ "12%",
290
  ],
291
+ elem_classes="dataframe-leaderboard",
292
  )
293
 
294
  with gr.Tab("Plot View"):
style/css_html_js.py CHANGED
@@ -123,6 +123,41 @@ input[role="listbox"] {
123
  .metrics-page p {
124
  text-align: left !important;
125
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  """
127
 
128
  get_window_url_params = """
 
123
  .metrics-page p {
124
  text-align: left !important;
125
  }
126
+ .dataframe-leaderboard td,
127
+ .dataframe-leaderboard th {
128
+ text-align: center !important;
129
+ vertical-align: middle !important;
130
+ }
131
+
132
+ .dataframe-leaderboard th .cell-wrap,
133
+ .dataframe-leaderboard th .header-content,
134
+ .dataframe-leaderboard th .header-button,
135
+ .dataframe-leaderboard th .header-text,
136
+ .dataframe-leaderboard th .header-button span {
137
+ display: flex !important;
138
+ justify-content: center !important;
139
+ align-items: center !important;
140
+ text-align: center !important;
141
+ }
142
+
143
+ .dataframe-leaderboard tbody td:nth-child(3),
144
+ .dataframe-leaderboard tbody td:nth-child(4) {
145
+ text-align: left !important;
146
+ }
147
+
148
+ .dataframe-leaderboard thead th:nth-child(3) .cell-wrap,
149
+ .dataframe-leaderboard thead th:nth-child(3) .header-content,
150
+ .dataframe-leaderboard thead th:nth-child(3) .header-button,
151
+ .dataframe-leaderboard thead th:nth-child(3) .header-text,
152
+ .dataframe-leaderboard thead th:nth-child(3) .header-button span,
153
+ .dataframe-leaderboard thead th:nth-child(4) .cell-wrap,
154
+ .dataframe-leaderboard thead th:nth-child(4) .header-content,
155
+ .dataframe-leaderboard thead th:nth-child(4) .header-button,
156
+ .dataframe-leaderboard thead th:nth-child(4) .header-text,
157
+ .dataframe-leaderboard thead th:nth-child(4) .header-button span {
158
+ justify-content: flex-start !important;
159
+ text-align: left !important;
160
+ }
161
  """
162
 
163
  get_window_url_params = """