Sonja Topf commited on
Commit
0aacfc1
·
1 Parent(s): d9825b4

submission form prettier, dark mode a bit better

Browse files
frontend/layout.py CHANGED
@@ -147,7 +147,7 @@ def create_leaderboard_tab(refresh_callback: Callable = None) -> gr.TabItem:
147
  return new_data
148
 
149
  # Info section
150
- info_html = gr.HTML(LeaderboardContent.get_info_html())
151
 
152
  return tab, table
153
 
@@ -167,148 +167,198 @@ def create_submission_tab(submit_callback: Callable = None) -> gr.TabItem:
167
  """Create the submission tab layout"""
168
 
169
  with gr.TabItem("Submit", elem_id="submission-tab", id=2) as tab:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
- gr.HTML(f"""<div class="header-section">
172
- <h2 class="header-emoji">{SubmissionContent.emoji}</h2>
173
- <h2 class="header-title">{SubmissionContent.title}</h2>
174
- </div>""")
175
-
176
- # Instructions
177
- instructions_html = gr.HTML(SubmissionContent.get_instructions_html())
178
-
179
- # Submission form
180
- with gr.Blocks(elem_classes=["form-container"]):
181
- # Required fields
182
- model_name = gr.Textbox(
183
- label=SubmissionContent.form_labels["model_name"],
184
- placeholder=SubmissionContent.form_placeholders["model_name"],
185
- info=SubmissionContent.form_info["model_name"],
186
- )
187
-
188
- hf_space_tag = gr.Textbox(
189
- label=SubmissionContent.form_labels["hf_space_tag"],
190
- placeholder=SubmissionContent.form_placeholders["hf_space_tag"],
191
- info=SubmissionContent.form_info["hf_space_tag"],
192
- )
193
-
194
- model_description = gr.Textbox(
195
- label=SubmissionContent.form_labels["model_description"],
196
- placeholder=SubmissionContent.form_placeholders[
197
- "model_description"
198
- ],
199
- info=SubmissionContent.form_info["model_description"],
200
- lines=3,
201
- )
202
 
203
- # Optional fields in accordion
204
- # with gr.Accordion("Additional Information", open=False):
205
- organization = gr.Textbox(
206
- label=SubmissionContent.form_labels["organization"],
207
- placeholder=SubmissionContent.form_placeholders[
208
- "organization"
209
- ],
210
- )
 
 
 
211
 
212
- model_size = gr.Textbox(
213
- label=SubmissionContent.form_labels["model_size"],
 
 
 
214
  placeholder=SubmissionContent.form_placeholders[
215
- "model_size"
216
  ],
 
 
 
217
  )
218
 
219
- with gr.Row():
 
 
 
 
 
 
 
 
 
 
220
  pretrained = gr.Checkbox(
221
  label=SubmissionContent.form_labels["pretrained"],
 
 
222
  )
223
 
 
 
224
  pretraining_data = gr.Textbox(
225
  label=SubmissionContent.form_labels["pretraining_data"],
226
  placeholder=SubmissionContent.form_placeholders[
227
  "pretraining_data"
228
  ],
229
  visible="hidden",
 
 
 
230
  )
231
 
232
  # When checkbox changes, update visibility
233
  pretrained.change(
234
- fn=lambda checked: gr.update(visible=True if checked else "hidden"),
 
 
 
235
  inputs=pretrained,
236
- outputs=pretraining_data
237
  )
238
 
239
- # pretrained = gr.Textbox(
240
- # label=SubmissionContent.form_labels["pretrained"],
241
- # placeholder=SubmissionContent.form_placeholders[
242
- # "pretrained"
243
- # ],
244
- # )
245
-
246
- publication_title = gr.Textbox(
247
- label=SubmissionContent.form_labels["publication_title"],
248
- placeholder=SubmissionContent.form_placeholders[
249
- "publication_title"
250
- ],
251
- )
252
-
253
- publication_link = gr.Textbox(
254
- label=SubmissionContent.form_labels["publication_link"],
255
- placeholder=SubmissionContent.form_placeholders[
256
- "publication_link"
257
- ],
258
- )
259
 
260
- zero_shot = gr.Checkbox(
261
- label=SubmissionContent.form_labels["zero_shot"],
 
 
 
 
 
 
 
262
  )
263
-
264
 
265
- with gr.Row():
 
 
 
 
 
 
266
  few_shot = gr.Checkbox(
267
  label=SubmissionContent.form_labels["few_shot"],
 
 
268
  )
 
 
 
269
  n_shot = gr.Textbox(
270
  label=SubmissionContent.form_labels["n_shot"],
271
  placeholder=SubmissionContent.form_placeholders[
272
  "n_shot"
273
  ],
274
  visible="hidden",
 
 
 
275
  )
276
 
277
  few_shot.change(
278
- fn=lambda checked: gr.update(visible=True if checked else "hidden"),
 
 
 
279
  inputs=few_shot,
280
- outputs=n_shot
281
  )
282
 
283
- agree = gr.Checkbox(label="I confirm that the submission fulfills the requirements and that the results are reproducible.", elem_id="agree-checkbox")
284
-
285
-
286
-
287
-
288
- # Submit button and result
289
- submit_btn = gr.Button("Submit Model", value="primary", interactive=False, elem_classes=["submit-button"])
290
- agree.change(lambda x: gr.update(interactive=x), inputs=agree, outputs=submit_btn)
291
- result_msg = gr.HTML()
292
-
293
- if submit_callback:
294
- submit_btn.click(
295
- fn=submit_callback,
296
- inputs=[
297
- model_name,
298
- hf_space_tag,
299
- model_description,
300
- organization,
301
- model_size,
302
- pretrained,
303
- pretraining_data,
304
- publication_title,
305
- publication_link,
306
- zero_shot,
307
- few_shot,
308
- n_shot,
309
- ],
310
- outputs=result_msg,
311
- )
 
312
 
313
  return tab
314
 
 
147
  return new_data
148
 
149
  # Info section
150
+ info_html = gr.HTML(LeaderboardContent.get_info_html(), elem_classes=["info-leaderboard"])
151
 
152
  return tab, table
153
 
 
167
  """Create the submission tab layout"""
168
 
169
  with gr.TabItem("Submit", elem_id="submission-tab", id=2) as tab:
170
+ with gr.Blocks(elem_classes=["form-wrapper"]):
171
+ gr.HTML(f"""<div class="header-section">
172
+ <h2 class="header-emoji">{SubmissionContent.emoji}</h2>
173
+ <h2 class="header-title">{SubmissionContent.title}</h2>
174
+ </div>""")
175
+
176
+ # Instructions
177
+ instructions_html = gr.HTML(SubmissionContent.get_instructions_html())
178
+
179
+ # Submission form
180
+ with gr.Blocks():
181
+ # Required fields
182
+ gr.HTML(f"<div>{SubmissionContent.form_labels['model_name']}</div>", container=False, elem_classes=["field-label"])
183
+ model_name = gr.Textbox(
184
+ show_label=True,
185
+ placeholder=SubmissionContent.form_placeholders["model_name"],
186
+ #info=SubmissionContent.form_info["model_name"],
187
+ container=False,
188
+ elem_classes=["form-container"],
189
+ max_lines=1,
190
+ )
191
 
192
+ gr.HTML(f"<div>{SubmissionContent.form_labels['hf_space_tag']}</div>", container=False, elem_classes=["field-label"])
193
+ hf_space_tag = gr.Textbox(
194
+ label=SubmissionContent.form_labels["hf_space_tag"],
195
+ placeholder=SubmissionContent.form_placeholders["hf_space_tag"],
196
+ #info=SubmissionContent.form_info["hf_space_tag"],
197
+ container=False,
198
+ max_lines=1,
199
+ elem_classes=["form-container"]
200
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
 
202
+ gr.HTML(f"<div>{SubmissionContent.form_labels['model_description']}</div>", container=False, elem_classes=["field-label"])
203
+ model_description = gr.Textbox(
204
+ label=SubmissionContent.form_labels["model_description"],
205
+ placeholder=SubmissionContent.form_placeholders[
206
+ "model_description"
207
+ ],
208
+ #info=SubmissionContent.form_info["model_description"],
209
+ lines=3,
210
+ container=False,
211
+ elem_classes=["form-container"]
212
+ )
213
 
214
+ # Optional fields in accordion
215
+ # with gr.Accordion("Additional Information", open=False):
216
+ gr.HTML(f"<div>{SubmissionContent.form_labels['organization']}</div>", container=False, elem_classes=["field-label"])
217
+ organization = gr.Textbox(
218
+ label=SubmissionContent.form_labels["organization"],
219
  placeholder=SubmissionContent.form_placeholders[
220
+ "organization"
221
  ],
222
+ container=False,
223
+ elem_classes=["form-container"],
224
+ max_lines=1,
225
  )
226
 
227
+ gr.HTML(f"<div>{SubmissionContent.form_labels['model_size']}</div>", container=False, elem_classes=["field-label"])
228
+ model_size = gr.Textbox(
229
+ label=SubmissionContent.form_labels["model_size"],
230
+ placeholder=SubmissionContent.form_placeholders[
231
+ "model_size"
232
+ ],
233
+ container=False,
234
+ max_lines=1,
235
+ elem_classes=["form-container"]
236
+ )
237
+
238
  pretrained = gr.Checkbox(
239
  label=SubmissionContent.form_labels["pretrained"],
240
+ container=False,
241
+ elem_classes=["form-container-checkbox"]
242
  )
243
 
244
+ pretraining_label = gr.HTML(f"<div>{SubmissionContent.form_labels['pretraining_data']}</div>", container=False,
245
+ elem_classes=["field-label"], visible="hidden")
246
  pretraining_data = gr.Textbox(
247
  label=SubmissionContent.form_labels["pretraining_data"],
248
  placeholder=SubmissionContent.form_placeholders[
249
  "pretraining_data"
250
  ],
251
  visible="hidden",
252
+ container=False,
253
+ max_lines=1,
254
+ elem_classes=["form-container"]
255
  )
256
 
257
  # When checkbox changes, update visibility
258
  pretrained.change(
259
+ fn=lambda checked: [
260
+ gr.update(visible=checked),
261
+ gr.update(visible=checked),
262
+ ],
263
  inputs=pretrained,
264
+ outputs=[pretraining_label, pretraining_data],
265
  )
266
 
267
+ # pretrained = gr.Textbox(
268
+ # label=SubmissionContent.form_labels["pretrained"],
269
+ # placeholder=SubmissionContent.form_placeholders[
270
+ # "pretrained"
271
+ # ],
272
+ # )
273
+
274
+ gr.HTML(f"<div>{SubmissionContent.form_labels['publication_title']}</div>",
275
+ container=False, elem_classes=["field-label"])
276
+ publication_title = gr.Textbox(
277
+ label=SubmissionContent.form_labels["publication_title"],
278
+ placeholder=SubmissionContent.form_placeholders[
279
+ "publication_title"
280
+ ],
281
+ container=False,
282
+ max_lines=1,
283
+ elem_classes=["form-container"]
284
+ )
 
 
285
 
286
+ gr.HTML(f"<div>{SubmissionContent.form_labels['publication_link']}</div>", container=False, elem_classes=["field-label"])
287
+ publication_link = gr.Textbox(
288
+ label=SubmissionContent.form_labels["publication_link"],
289
+ placeholder=SubmissionContent.form_placeholders[
290
+ "publication_link"
291
+ ],
292
+ max_lines=1,
293
+ container=False,
294
+ elem_classes=["form-container"]
295
  )
 
296
 
297
+ zero_shot = gr.Checkbox(
298
+ label=SubmissionContent.form_labels["zero_shot"],
299
+ container=False,
300
+ elem_classes=["form-container-checkbox"]
301
+ )
302
+
303
+
304
  few_shot = gr.Checkbox(
305
  label=SubmissionContent.form_labels["few_shot"],
306
+ container=False,
307
+ elem_classes=["form-container-checkbox"]
308
  )
309
+
310
+ n_shot_label = gr.HTML(f"<div>{SubmissionContent.form_labels['n_shot']}</div>",
311
+ container=False, elem_classes=["field-label"], visible="hidden")
312
  n_shot = gr.Textbox(
313
  label=SubmissionContent.form_labels["n_shot"],
314
  placeholder=SubmissionContent.form_placeholders[
315
  "n_shot"
316
  ],
317
  visible="hidden",
318
+ container=False,
319
+ max_lines=1,
320
+ elem_classes=["form-container"]
321
  )
322
 
323
  few_shot.change(
324
+ fn=lambda checked: [
325
+ gr.update(visible=checked),
326
+ gr.update(visible=checked),
327
+ ],
328
  inputs=few_shot,
329
+ outputs=[n_shot_label, n_shot],
330
  )
331
 
332
+ agree = gr.Checkbox(label="I confirm that the submission fulfills the requirements and that the results are reproducible.",
333
+ elem_id="agree-checkbox", container=False, elem_classes=["form-container-checkbox"])
334
+
335
+
336
+
337
+
338
+ # Submit button and result
339
+ submit_btn = gr.Button("Submit", value="primary", interactive=False, elem_classes=["submit-button", "form-container-checkbox"])
340
+ agree.change(lambda x: gr.update(interactive=x), inputs=agree, outputs=submit_btn)
341
+ result_msg = gr.HTML()
342
+
343
+ if submit_callback:
344
+ submit_btn.click(
345
+ fn=submit_callback,
346
+ inputs=[
347
+ model_name,
348
+ hf_space_tag,
349
+ model_description,
350
+ organization,
351
+ model_size,
352
+ pretrained,
353
+ pretraining_data,
354
+ publication_title,
355
+ publication_link,
356
+ zero_shot,
357
+ few_shot,
358
+ n_shot,
359
+ ],
360
+ outputs=result_msg,
361
+ )
362
 
363
  return tab
364
 
frontend/leaderboard.py CHANGED
@@ -56,7 +56,7 @@ def format_leaderboard_data(raw_data: dict) -> pd.DataFrame:
56
  ("", "Model"): config["model_name"],
57
  ("", "Organization"): config.get("organization", ""),
58
  ("", "Avg. AUC"): results["overall_score"]["roc_auc"],
59
- ("", "ΔAUC-PR"): config.get("daucpr", ""),
60
  }
61
  print(results["overall_score"])
62
 
@@ -66,7 +66,7 @@ def format_leaderboard_data(raw_data: dict) -> pd.DataFrame:
66
  row[("ROC-AUC", task_key)] = task_result.get("roc_auc", "")
67
  for task_key, task_result in results.items():
68
  if task_key != "overall_score":
69
- row[("ΔAUC-PR", task_key)] = task_result.get("delta_auc_pr", "")
70
 
71
 
72
  # === Then continue with the rest of the metadata columns ===
 
56
  ("", "Model"): config["model_name"],
57
  ("", "Organization"): config.get("organization", ""),
58
  ("", "Avg. AUC"): results["overall_score"]["roc_auc"],
59
+ ("", "ΔAUC-PR"): results["overall_score"].get("delta_auprc"),
60
  }
61
  print(results["overall_score"])
62
 
 
66
  row[("ROC-AUC", task_key)] = task_result.get("roc_auc", "")
67
  for task_key, task_result in results.items():
68
  if task_key != "overall_score":
69
+ row[("ΔAUC-PR", task_key)] = task_result.get("delta_auprc", "")
70
 
71
 
72
  # === Then continue with the rest of the metadata columns ===
frontend/styles.css CHANGED
@@ -53,9 +53,8 @@ body, .gradio-container {
53
  .leaderboard-container {
54
  overflow: auto;
55
  max-height: 600px; /* scroll vertically after ~10 rows */
56
- border: 1px solid #e5e7eb;
57
  border-radius: 10px;
58
- background: #fff;
59
  margin-top: 3px;
60
  }
61
 
@@ -74,15 +73,20 @@ body, .gradio-container {
74
  padding: 10px 14px;
75
  font-weight: 600;
76
  font-size: 14px;
77
- background: #f9fafb;
78
- border: 1px solid #e5e7eb;
79
  position: sticky;
 
80
  top: 0;
81
  z-index: 2;
 
 
 
 
 
 
82
  }
83
 
84
  .leaderboard-table thead tr:first-child th {
85
- background: #f1f5f9;
86
  font-weight: 700;
87
  }
88
 
@@ -98,21 +102,16 @@ body, .gradio-container {
98
  text-align: left;
99
  padding: 10px 14px;
100
  font-size: 14px;
101
- color: #111827;
102
- border: 1px solid #f3f4f6;
103
  vertical-align: top;
104
  word-break: break-word;
105
  white-space: normal;
106
  line-height: 1.5;
 
 
107
  }
108
 
109
- /* === Hover effect === */
110
- .leaderboard-row:hover {
111
- background-color: #f8fafc;
112
- transition: background-color 0.15s ease-in-out;
113
- }
114
 
115
- /* === Scrollbar === */
116
  .leaderboard-container::-webkit-scrollbar {
117
  height: 8px;
118
  }
@@ -121,7 +120,7 @@ body, .gradio-container {
121
  border-radius: 4px;
122
  }
123
  .leaderboard-container::-webkit-scrollbar-thumb:hover {
124
- background: #94a3b8;
125
  }
126
 
127
 
@@ -132,7 +131,6 @@ body, .gradio-container {
132
 
133
 
134
 
135
-
136
  #leaderboard-tab,
137
  #leaderboard-tab .gr-panel,
138
  #leaderboard-tab .gr-block,
@@ -179,8 +177,8 @@ body, .gradio-container {
179
  align-items: center !important;
180
  justify-content: center !important;
181
  gap: 8px !important;
182
- padding: 6px 8px 6px 15px !important;
183
- color: white !important;
184
  font-weight: 700 !important;
185
  font-size: 25px !important;
186
  border-radius: 30px !important;
@@ -199,12 +197,20 @@ body, .gradio-container {
199
 
200
  /* Remove tab panel border + shadow */
201
  #submission-tab,
202
- #submission-tab .gr-panel,
203
  #submission-tab .gr-block,
204
- #submission-tab .gr-box {
205
- border: none !important;
206
- box-shadow: none !important;
 
 
 
 
 
 
207
  padding: 0 !important;
 
 
 
208
  }
209
 
210
 
@@ -228,13 +234,13 @@ body, .gradio-container {
228
  border: none !important;
229
  box-shadow: none !important;
230
  padding: 0.3rem 0 !important;
231
- font-weight: 400 !important;
232
- color: #222 !important;
233
  }
234
 
235
  /* Active tab text bold */
236
  .tab-nav button[aria-selected="true"] {
237
- font-weight: 600 !important;
238
  }
239
 
240
  /* Make the underline visible and above everything */
@@ -248,130 +254,149 @@ body, .gradio-container {
248
  display: block;
249
  pointer-events: none;
250
  z-index: 10; /* ensures it's visible */
251
- border-bottom: #222 3px
252
  }
253
 
254
 
255
 
256
 
257
 
258
- .form-container {
259
- border: none !important;
260
- }
261
- /* Remove the container border + shadow */
262
- /* Remove the outer border + gray background */
263
- .form-container .form {
264
- background: white !important;
265
  border: none !important;
266
- box-shadow: none !important;
267
- padding: 0 !important;
 
 
268
  }
269
 
270
- /* Remove the gray separator "bars" between inputs */
271
- .form-container .block {
272
- border: none !important;
273
- box-shadow: none !important;
274
- margin: 0 !important;
275
- padding: 0 !important;
 
 
 
276
  }
277
 
278
- /* Add spacing between input groups */
279
- .form-container .block:not(:last-child) {
280
- margin-bottom: 18px !important;
281
- border: none;
 
 
 
 
 
 
282
  }
283
 
284
- /* Style the actual text fields */
285
- .form-container input,
286
- .form-container textarea {
287
- border: 1px solid #d1d5db !important;
288
- background: white !important;
289
- border-radius: 8px !important;
290
- padding: 10px 12px !important;
291
- font-size: 15px !important;
292
- transition: 0.15s ease;
293
  }
294
 
295
- /* Focus effect */
296
- .form-container input:focus,
297
- .form-container textarea:focus {
298
- outline: none !important;
299
- border-color: #6366f1 !important;
300
- background: #ffffff !important;
301
- box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
302
- transition: box-shadow 0.2s ease, border-color 0.2s ease;
303
  }
304
 
305
- .form-container .block:focus-within {
306
- position: relative;
307
- z-index: 2;
 
 
 
 
 
 
 
 
 
 
 
 
308
  }
309
 
310
- .form-container input:hover,
311
- .form-container textarea:hover {
312
- border-color: #b7bce8 !important;
 
 
 
313
  }
314
 
315
- /* Make labels clean + consistent */
316
- .form-container label {
317
- display: block !important;
318
- margin-bottom: 6px !important;
319
- font-weight: 700 !important; /* thicker */
320
- font-size: 15px !important;
321
- color: #111 !important; /* true black, not gray */
322
  }
323
 
324
- .form-container.gr-block,
325
- .form-container .gr-block,
326
- .form-container .gr-box {
327
- border: none !important;
328
- box-shadow: none !important;
329
- background: white !important;
330
- padding: 0 !important;
331
- }
332
 
333
- /* Also remove the automatically injected Gradio border variable */
334
- .form-container {
335
- --block-border-width: 0px !important;
336
- }
337
 
338
 
339
 
340
 
341
 
342
 
343
- /* Base button styling */
344
- .submit-button button {
345
- background: #6366f1 !important; /* Indigo */
346
- color: white !important;
347
- border: none !important;
348
- border-radius: 8px !important;
349
- padding: 10px 16px !important;
350
- font-size: 15px !important;
351
- font-weight: 600 !important;
352
- cursor: pointer !important;
353
- }
354
 
355
- /* Hover state */
356
- .submit-button button:hover {
357
- background: #4f46e5 !important; /* darker indigo */
358
- box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35) !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
359
  }
360
 
361
- /* Active (pressed) state */
362
- .submit-button button:active {
363
- background: #4338ca !important;
364
- transform: scale(0.98);
 
365
  }
366
 
367
- /* Disabled state (before checkbox is checked) */
368
- .submit-button button:disabled {
369
- background: #d1d5db !important; /* Light gray */
370
- color: #9ca3af !important; /* Muted gray text */
371
- cursor: not-allowed !important;
372
- box-shadow: none !important;
373
- opacity: 0.75 !important;
374
- }
375
 
376
 
377
 
@@ -380,10 +405,11 @@ body, .gradio-container {
380
 
381
 
382
  .instructions-section {
383
- padding: 16px 18px;
384
  font-size: 15px;
385
  line-height: 1.5;
386
  margin-bottom: 20px;
 
387
  }
388
 
389
  .instructions-section code {
@@ -400,3 +426,10 @@ body, .gradio-container {
400
  .instructions-section p {
401
  margin: 6px 0;
402
  }
 
 
 
 
 
 
 
 
53
  .leaderboard-container {
54
  overflow: auto;
55
  max-height: 600px; /* scroll vertically after ~10 rows */
56
+ border: 1px solid #d1d5db;
57
  border-radius: 10px;
 
58
  margin-top: 3px;
59
  }
60
 
 
73
  padding: 10px 14px;
74
  font-weight: 600;
75
  font-size: 14px;
76
+ border: 1px solid #d1d5db;
 
77
  position: sticky;
78
+ background-color: #F4F4F3;
79
  top: 0;
80
  z-index: 2;
81
+ word-break: break-word;
82
+ max-width: 300px;
83
+ }
84
+
85
+ .leaderboard-table tbody tr:last-child td {
86
+ border-bottom: 1px white !important;
87
  }
88
 
89
  .leaderboard-table thead tr:first-child th {
 
90
  font-weight: 700;
91
  }
92
 
 
102
  text-align: left;
103
  padding: 10px 14px;
104
  font-size: 14px;
105
+ border: 1px solid #d1d5db;
 
106
  vertical-align: top;
107
  word-break: break-word;
108
  white-space: normal;
109
  line-height: 1.5;
110
+ max-width: 300px;
111
+ word-break: break-word;
112
  }
113
 
 
 
 
 
 
114
 
 
115
  .leaderboard-container::-webkit-scrollbar {
116
  height: 8px;
117
  }
 
120
  border-radius: 4px;
121
  }
122
  .leaderboard-container::-webkit-scrollbar-thumb:hover {
123
+ background: #7E848C;
124
  }
125
 
126
 
 
131
 
132
 
133
 
 
134
  #leaderboard-tab,
135
  #leaderboard-tab .gr-panel,
136
  #leaderboard-tab .gr-block,
 
177
  align-items: center !important;
178
  justify-content: center !important;
179
  gap: 8px !important;
180
+ padding: 20px !important;
181
+ background-color: white;
182
  font-weight: 700 !important;
183
  font-size: 25px !important;
184
  border-radius: 30px !important;
 
197
 
198
  /* Remove tab panel border + shadow */
199
  #submission-tab,
 
200
  #submission-tab .gr-block,
201
+ #submission-tab .gr-box,
202
+ #submission-tab .column {
203
+ margin: 0 !important;
204
+ padding: 0 !important;
205
+ gap: 0 !important;
206
+ }
207
+
208
+ #submission-tab .form-wrapper * {
209
+ margin: 0 !important;
210
  padding: 0 !important;
211
+ gap: 0 !important;
212
+ box-shadow: none !important;
213
+ border: none !important;
214
  }
215
 
216
 
 
234
  border: none !important;
235
  box-shadow: none !important;
236
  padding: 0.3rem 0 !important;
237
+ font-weight: 600 !important;
238
+ color: #666 !important;
239
  }
240
 
241
  /* Active tab text bold */
242
  .tab-nav button[aria-selected="true"] {
243
+ font-weight: 700 !important;
244
  }
245
 
246
  /* Make the underline visible and above everything */
 
254
  display: block;
255
  pointer-events: none;
256
  z-index: 10; /* ensures it's visible */
257
+ border-bottom: #666 5px
258
  }
259
 
260
 
261
 
262
 
263
 
264
+ /* === Form wrapper (outer layout) === */
265
+ .form-wrapper {
266
+ margin: 0 auto !important;
267
+ padding: 16px 5px !important;
 
 
 
268
  border: none !important;
269
+ max-width: 80%;
270
+ display: flex;
271
+ flex-direction: column;
272
+ align-items: flex-start; /* ✅ modern, replaces old -ms-flex-align */
273
  }
274
 
275
+ /* === Label wrapper === */
276
+ .field-label {
277
+ color: #111827;
278
+ font-size: 14px !important;
279
+ font-weight: 500;
280
+ margin-bottom: 2px !important; /* tighter spacing below */
281
+ margin-top: 10px !important; /* consistent space above */
282
+ line-height: 1.3;
283
+ padding-left: 2px; /* ✅ tiny indent for visual alignment */
284
  }
285
 
286
+ /* === Textboxes === */
287
+ .form-container {
288
+ width: 100%;
289
+ border: 1px solid #e5e7eb;
290
+ border-radius: 8px;
291
+ padding: 8px 10px;
292
+ font-size: 14px;
293
+ color: #111827;
294
+ box-sizing: border-box;
295
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
296
  }
297
 
298
+ .form-container:focus,
299
+ .form-container:active {
300
+ border-color: #3b82f6;
301
+ outline: none;
302
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
 
 
 
 
303
  }
304
 
305
+ /* === Placeholder === */
306
+ .form-container::placeholder {
307
+ color: #9ca3af;
 
 
 
 
 
308
  }
309
 
310
+ /* === Checkbox alignment === */
311
+ .form-container-checkbox {
312
+ display: flex; /* ✅ aligns checkbox + label nicely */
313
+ align-items: center;
314
+ gap: 8px; /* space between checkbox and text */
315
+ padding: 8px 10px;
316
+ margin-top: 10px !important;
317
+ margin-bottom: 5px !important;
318
+ font-size: 14px !important;
319
+ font-weight: 500;
320
+ color: #111827;
321
+ width: 100%;
322
+ box-sizing: border-box;
323
+ background: transparent;
324
+ border-radius: 8px;
325
  }
326
 
327
+ /* === Checkbox input itself === */
328
+ .form-container-checkbox input[type="checkbox"] {
329
+ accent-color: #3b82f6;
330
+ transform: scale(1.1);
331
+ margin-left: 4px;
332
+ cursor: pointer;
333
  }
334
 
335
+ /* === Subtle hover cue for inputs === */
336
+ .form-container:hover {
337
+ border-color: #d1d5db;
 
 
 
 
338
  }
339
 
 
 
 
 
 
 
 
 
340
 
 
 
 
 
341
 
342
 
343
 
344
 
345
 
346
 
 
 
 
 
 
 
 
 
 
 
 
347
 
348
+ /* === Submit Button === */
349
+ .submit-button {
350
+ display: inline-block !important;
351
+ background-color: #ACCBE1 !important; /* indigo base */
352
+ color: #fff !important;
353
+ border: none !important;
354
+ border-radius: 8px !important;
355
+ padding: 12px 22px !important;
356
+ font-size: 15px !important;
357
+ font-weight: 600 !important;
358
+ cursor: pointer !important;
359
+ transition: all 0.15s ease-in-out;
360
+ width:100%;
361
+
362
+ /* Fix weird float / alignment */
363
+ align-self: flex-start !important; /* ✅ anchors left within flex parent */
364
+ margin-top: 16px !important; /* ✅ small top gap */
365
+ margin-bottom: 8px !important;
366
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
367
+ }
368
+
369
+ /* === Hover state === */
370
+ .submit-button:hover:not(:disabled) {
371
+ background-color: #ACCBE1 !important; /* darker indigo */
372
+ box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35) !important;
373
+ transform: translateY(-1px);
374
+ }
375
+
376
+ /* === Active (pressed) state === */
377
+ .submit-button:active:not(:disabled) {
378
+ background-color: #CEE5F2 !important;
379
+ transform: scale(0.98);
380
+ box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25) !important;
381
+ }
382
+
383
+ /* === Disabled state === */
384
+ .submit-button:disabled {
385
+ background-color: #CEE5F2 !important; /* Light gray */
386
+ color: #9ca3af !important; /* Muted gray text */
387
+ cursor: not-allowed !important;
388
+ box-shadow: none !important;
389
+ opacity: 0.75 !important;
390
+ transform: none !important;
391
  }
392
 
393
+ /* === Ensure Gradio doesn’t override the background === */
394
+ #submission-tab .submit-button,
395
+ .form-container .submit-button,
396
+ .gr-button.submit-button {
397
+ background-color: #ACCBE1 !important;
398
  }
399
 
 
 
 
 
 
 
 
 
400
 
401
 
402
 
 
405
 
406
 
407
  .instructions-section {
408
+ padding: 10px 18px;
409
  font-size: 15px;
410
  line-height: 1.5;
411
  margin-bottom: 20px;
412
+ margin-top: 20px;
413
  }
414
 
415
  .instructions-section code {
 
426
  .instructions-section p {
427
  margin: 6px 0;
428
  }
429
+
430
+
431
+
432
+ .info-leaderboard {
433
+ margin-top: 10px;
434
+ margin-left: 20px;
435
+ }
frontend/submission.py CHANGED
@@ -12,10 +12,10 @@ def handle_submission(
12
 
13
  # Basic validation
14
  if not model_name or not hf_space_tag or not model_description:
15
- return "<div style='color: red;'>L Error: Please fill in all required fields (*)</div>"
16
 
17
  if "/" not in hf_space_tag:
18
- return "<div style='color: red;'>L Error: HuggingFace space tag should be in format 'username/space-name'</div>"
19
 
20
  # Process submission
21
  try:
 
12
 
13
  # Basic validation
14
  if not model_name or not hf_space_tag or not model_description:
15
+ return "<div style='color: red;'>Please fill in all required fields (*)</div>"
16
 
17
  if "/" not in hf_space_tag:
18
+ return "<div style='color: red;'>HuggingFace space tag should be in format 'username/space-name'</div>"
19
 
20
  # Process submission
21
  try: