danemery-ai2 commited on
Commit
50fb0f5
·
unverified ·
1 Parent(s): 18f8616

Submission page agent tooltips (#22)

Browse files
Files changed (3) hide show
  1. content.py +40 -3
  2. submission.py +31 -2
  3. ui_components.py +1 -1
content.py CHANGED
@@ -317,19 +317,24 @@ html:not(.dark) #legend-markdown .light-mode-icon,
317
  bottom: 125%;
318
  background-color: #105257;
319
  color: #fff;
320
- padding: 0px 10px 10px;
321
  border-radius: 4px;
322
  font-size: 12px;
323
  opacity: 0;
324
  transition: opacity 0.2s;
325
  white-space: pre-line;
326
  width: max-content;
327
- max-width: 350px; /* Limit width for better readability */
328
  text-align: left;
329
  pointer-events: none;
 
330
  left: 50%;
331
  transform: translateX(-50%);
332
- z-index: 1000;
 
 
 
 
 
333
  }
334
  .tooltip-icon:hover::after {
335
  opacity: 1;
@@ -385,4 +390,36 @@ html:not(.dark) #legend-markdown .light-mode-icon,
385
  grid-row: 2 !important;
386
  grid-column: 1 / -1 !important;
387
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  """
 
317
  bottom: 125%;
318
  background-color: #105257;
319
  color: #fff;
320
+ padding: 0px 10px 15px;
321
  border-radius: 4px;
322
  font-size: 12px;
323
  opacity: 0;
324
  transition: opacity 0.2s;
325
  white-space: pre-line;
326
  width: max-content;
 
327
  text-align: left;
328
  pointer-events: none;
329
+ max-width: 300px;
330
  left: 50%;
331
  transform: translateX(-50%);
332
+ z-index: 1000;
333
+ }
334
+ @media (max-width: 768px) {
335
+ .tooltip-icon::after {
336
+ max-width: 250px;
337
+ }
338
  }
339
  .tooltip-icon:hover::after {
340
  opacity: 1;
 
390
  grid-row: 2 !important;
391
  grid-column: 1 / -1 !important;
392
  }
393
+ /*------ Submission Page CSS ------*/
394
+ #custom-form-group {
395
+ border: 1px solid #000 !important;
396
+ border-radius: 4px !important;
397
+ padding: 16px 16px 0px 0px !important;
398
+ overflow: visible !important;
399
+ }
400
+
401
+ #openness-label-html,
402
+ #agent-tooling-label-html {
403
+ padding-left: 12px;
404
+ }
405
+
406
+ #custom-form-group fieldset {
407
+ padding-top: 0px !important;
408
+ }
409
+
410
+ #agent-tooling-label-html {
411
+ padding-top: 6px;
412
+ }
413
+
414
+ #custom-form-group,
415
+ .styler {
416
+ background: none;
417
+ }
418
+
419
+ /*------ This specific styles allows openness label tooltips to be visible ------*/
420
+ .styler,
421
+ #openness-label-html,
422
+ #agent-tooling-label-html {
423
+ overflow: visible !important;
424
+ }
425
  """
submission.py CHANGED
@@ -281,6 +281,32 @@ def add_new_eval(
281
  "Please refresh the leaderboard in a few moments. It may take some time for changes to propagate."
282
  )
283
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
 
285
  # --- Submission Accordion ---
286
  def build_page():
@@ -291,8 +317,11 @@ def build_page():
291
  agent_name_tb = gr.Textbox(label="Agent Name")
292
  agent_desc_tb = gr.Textbox(label="Agent Description")
293
  agent_url_tb = gr.Textbox(label="URL to Agent Information")
294
- openness_radio = gr.Radio(["Open Source","Open Source Open Weights", "API Available", "Closed"], value=None, label="Openness of Agent")
295
- degree_of_control_radio = gr.Radio(["Standard","Custom with Standard Search", "Fully Custom"], value=None, label="Agent Tooling")
 
 
 
296
  with gr.Column():
297
  username_tb = gr.Textbox(label="Organization or User Name (Defaults to HF username)")
298
  mail_tb = gr.Textbox(label="Contact Email (Private, for submission issues)")
 
281
  "Please refresh the leaderboard in a few moments. It may take some time for changes to propagate."
282
  )
283
 
284
+ openness_label_html = """
285
+ <div class="form-label-with-tooltip">
286
+ Openness of Agent
287
+ <span class="tooltip-icon" data-tooltip="
288
+ • Closed: No API or code available
289
+ • API Available: API available, but no code
290
+ • Open Source: Code available, but no weights
291
+ • Open Source + Open Weights: Code and weights available"
292
+ >
293
+
294
+ </span>
295
+ </div>
296
+ """
297
+
298
+ agent_tooling_label_html = """
299
+ <div class="form-label-with-tooltip">
300
+ Agent Tooling
301
+ <span class="tooltip-icon" data-tooltip="
302
+ • Standard: Only uses tools explicitly provided in state.tools
303
+ • Equivalent: Uses custom tools with identical or more restricted capabilities
304
+ • Fully Custom: Uses tools beyond constraints of Standard or Equivalent"
305
+ >
306
+
307
+ </span>
308
+ </div>
309
+ """
310
 
311
  # --- Submission Accordion ---
312
  def build_page():
 
317
  agent_name_tb = gr.Textbox(label="Agent Name")
318
  agent_desc_tb = gr.Textbox(label="Agent Description")
319
  agent_url_tb = gr.Textbox(label="URL to Agent Information")
320
+ with gr.Group(elem_id="custom-form-group"):
321
+ gr.HTML(value=openness_label_html, elem_id="openness-label-html")
322
+ openness_radio = gr.Radio(["Open Source","Open Source Open Weights", "API Available", "Closed"], value=None, label="")
323
+ gr.HTML(value=agent_tooling_label_html, elem_id="agent-tooling-label-html")
324
+ degree_of_control_radio = gr.Radio(["Standard","Equivalent", "Fully Custom"], value=None, label="")
325
  with gr.Column():
326
  username_tb = gr.Textbox(label="Organization or User Name (Defaults to HF username)")
327
  mail_tb = gr.Textbox(label="Contact Email (Private, for submission issues)")
ui_components.py CHANGED
@@ -162,7 +162,7 @@ legend_markdown = f"""
162
 
163
  <div> <!-- Container for the Pareto section -->
164
  <b>Pareto</b><span class="tooltip-icon" data-tooltip="
165
- •Pareto: Indicates if agent is on the Pareto frontier
166
  ">ⓘ</span>
167
  <div style="padding-top: 4px;"><span>🏆 On frontier</span></div>
168
  </div>
 
162
 
163
  <div> <!-- Container for the Pareto section -->
164
  <b>Pareto</b><span class="tooltip-icon" data-tooltip="
165
+ Indicates if agent is on the Pareto frontier
166
  ">ⓘ</span>
167
  <div style="padding-top: 4px;"><span>🏆 On frontier</span></div>
168
  </div>