Spaces:
Paused
Paused
Submission page revamp (#73)
Browse files- app.py +5 -1
- content.py +29 -6
- submission.py +47 -26
app.py
CHANGED
@@ -81,12 +81,16 @@ theme = gr.themes.Base(
|
|
81 |
block_title_text_color="*neutral_900",
|
82 |
button_primary_text_color='*neutral_900',
|
83 |
block_title_text_color_dark="#ffffff",
|
84 |
-
checkbox_label_text_color_dark="#000",
|
85 |
button_primary_text_color_dark='*neutral_900',
|
86 |
block_border_color="#032629",
|
87 |
block_border_color_dark="#9fead1",
|
88 |
block_background_fill_dark="#032629",
|
89 |
block_background_fill="#FAF2E9",
|
|
|
|
|
|
|
|
|
|
|
90 |
)
|
91 |
try:
|
92 |
with open(LOGO_PATH, "r") as f:
|
|
|
81 |
block_title_text_color="*neutral_900",
|
82 |
button_primary_text_color='*neutral_900',
|
83 |
block_title_text_color_dark="#ffffff",
|
|
|
84 |
button_primary_text_color_dark='*neutral_900',
|
85 |
block_border_color="#032629",
|
86 |
block_border_color_dark="#9fead1",
|
87 |
block_background_fill_dark="#032629",
|
88 |
block_background_fill="#FAF2E9",
|
89 |
+
checkbox_label_text_color="#032629",
|
90 |
+
checkbox_label_background_fill="#D8D6CF",
|
91 |
+
checkbox_label_background_fill_dark="#254243",
|
92 |
+
checkbox_background_color_selected="#F0529C",
|
93 |
+
checkbox_background_color_selected_dark="#0FCB8C",
|
94 |
)
|
95 |
try:
|
96 |
with open(LOGO_PATH, "r") as f:
|
content.py
CHANGED
@@ -539,27 +539,50 @@ span.wrap[tabindex="0"][role="button"][data-editable="false"] {
|
|
539 |
100% { transform: rotate(360deg); }
|
540 |
}
|
541 |
|
542 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
543 |
border: 1px solid #000 !important;
|
544 |
border-radius: 4px !important;
|
545 |
-
padding:
|
546 |
overflow: visible !important;
|
547 |
}
|
548 |
|
549 |
#openness-label-html,
|
550 |
-
#agent-tooling-label-html
|
|
|
|
|
|
|
|
|
|
|
551 |
padding-left: 12px;
|
552 |
}
|
553 |
|
554 |
-
|
555 |
-
|
|
|
|
|
|
|
|
|
556 |
}
|
557 |
|
558 |
#agent-tooling-label-html {
|
559 |
padding-top: 6px;
|
560 |
}
|
561 |
|
562 |
-
|
563 |
.styler {
|
564 |
background: none;
|
565 |
}
|
|
|
539 |
100% { transform: rotate(360deg); }
|
540 |
}
|
541 |
|
542 |
+
#submission-page-container {
|
543 |
+
max-width: 800px;
|
544 |
+
margin: 0 auto;
|
545 |
+
}
|
546 |
+
|
547 |
+
#submission-file-label {
|
548 |
+
padding: 10px;
|
549 |
+
}
|
550 |
+
|
551 |
+
#submission-button {
|
552 |
+
max-width: fit-content;
|
553 |
+
font-size: 14px;
|
554 |
+
}
|
555 |
+
|
556 |
+
.custom-form-group {
|
557 |
border: 1px solid #000 !important;
|
558 |
border-radius: 4px !important;
|
559 |
+
padding: 24px !important;
|
560 |
overflow: visible !important;
|
561 |
}
|
562 |
|
563 |
#openness-label-html,
|
564 |
+
#agent-tooling-label-html,
|
565 |
+
#agent-info-label-html,
|
566 |
+
#submitter-info-label-html,
|
567 |
+
#username-label-html,
|
568 |
+
#email-label-html,
|
569 |
+
#role-label-html {
|
570 |
padding-left: 12px;
|
571 |
}
|
572 |
|
573 |
+
.form-label {
|
574 |
+
margin: 4px 0px 0px 6px;
|
575 |
+
}
|
576 |
+
|
577 |
+
.form-label-fieldset {
|
578 |
+
padding-top: 10px !important;
|
579 |
}
|
580 |
|
581 |
#agent-tooling-label-html {
|
582 |
padding-top: 6px;
|
583 |
}
|
584 |
|
585 |
+
.custom-form-group,
|
586 |
.styler {
|
587 |
background: none;
|
588 |
}
|
submission.py
CHANGED
@@ -356,7 +356,7 @@ def _deprecated_scoring_logic():
|
|
356 |
|
357 |
openness_label_html = """
|
358 |
<div class="form-label-with-tooltip">
|
359 |
-
Openness
|
360 |
<span class="tooltip-icon" data-tooltip="• Closed: No API or code available
|
361 |
• API Available: API available, but no code
|
362 |
• Open Source: Code available, but no weights
|
@@ -388,34 +388,53 @@ heading_html = """
|
|
388 |
|
389 |
# --- Submission Accordion ---
|
390 |
def build_page():
|
391 |
-
with gr.
|
392 |
-
|
393 |
-
gr.HTML(heading_html)
|
394 |
-
with gr.Column():
|
395 |
-
pass # Keeps this row's content on the left side of the page.
|
396 |
-
with gr.Row():
|
397 |
gr.LoginButton()
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
file_upload_comp = gr.File(
|
413 |
-
|
414 |
file_types=[".gz", ".tar.gz"]
|
415 |
)
|
416 |
-
|
417 |
-
submit_eval_button = gr.Button("Submit Evaluation")
|
418 |
-
|
419 |
# Modals for loading spinner, success and error messages
|
420 |
with Modal(visible=False, elem_id="submission-modal") as loading_modal:
|
421 |
with gr.Column(elem_id="submission-modal-content"):
|
@@ -445,7 +464,9 @@ def build_page():
|
|
445 |
degree_of_control_radio,
|
446 |
file_upload_comp,
|
447 |
username_tb,
|
448 |
-
|
|
|
|
|
449 |
],
|
450 |
[error_message, error_modal, success_modal, loading_modal],
|
451 |
)
|
|
|
356 |
|
357 |
openness_label_html = """
|
358 |
<div class="form-label-with-tooltip">
|
359 |
+
Agent Openness
|
360 |
<span class="tooltip-icon" data-tooltip="• Closed: No API or code available
|
361 |
• API Available: API available, but no code
|
362 |
• Open Source: Code available, but no weights
|
|
|
388 |
|
389 |
# --- Submission Accordion ---
|
390 |
def build_page():
|
391 |
+
with gr.Column(elem_id="submission-page-container"):
|
392 |
+
gr.HTML(heading_html)
|
|
|
|
|
|
|
|
|
393 |
gr.LoginButton()
|
394 |
+
with gr.Group(elem_classes="custom-form-group"):
|
395 |
+
gr.HTML(value="""<h2>Submitter Information</h2>""", elem_id="submitter-info-label-html")
|
396 |
+
gr.HTML(value="""<h3>Username</h3>""", elem_classes="form-label")
|
397 |
+
username_tb = gr.Textbox(label="This will show on the leaderboard. By default, we’ll use your Hugging Face username; but you can enter your organization name instead (e.g., university, company, or lab).")
|
398 |
+
gr.HTML(value="""<h3>Role</h3>""", elem_classes="form-label")
|
399 |
+
role_selection = gr.Dropdown(label="Please select the role that most closely matches your current position. Helps us improve AstaBench for different user types. Not displayed on the leaderboard.",
|
400 |
+
interactive=True,
|
401 |
+
choices=[
|
402 |
+
"Undergraduate Student",
|
403 |
+
"Masters Student",
|
404 |
+
"PhD Student",
|
405 |
+
"Postdoctoral Researcher",
|
406 |
+
"Academic Faculty (e.g., Professor, Lecturer)",
|
407 |
+
"Industry Researcher (e.g., Research Scientist, Applied Scientist)",
|
408 |
+
"Engineer or Developer (e.g., Software or ML Engineer)",
|
409 |
+
"Data Scientist or Analyst",
|
410 |
+
"Product or Program Manager",
|
411 |
+
"Startup Founder or Independent Researcher",
|
412 |
+
"Other"
|
413 |
+
])
|
414 |
+
gr.HTML(value="""<h3>Contact email</h3>""", elem_classes="form-label")
|
415 |
+
mail_tb = gr.Textbox(label="We'll only use your email to communicate about your submission.")
|
416 |
+
mail_opt_in = gr.Checkbox(label="I’m open to being contacted by email for user research studies or feedback opportunities.")
|
417 |
+
with gr.Group(elem_classes="custom-form-group"):
|
418 |
+
gr.HTML(value="""<h2>Agent Information</h2>""", elem_id="agent-info-label-html")
|
419 |
+
gr.HTML(value="""<h3>Split</h3>""", elem_classes="form-label")
|
420 |
+
level_of_test_radio = gr.Radio(["Test set", "Validation set"], elem_classes="form-label-fieldset", value="validation", label="The Test Set is used for final leaderboard rankings. The Validation Set is for development and iteration. Choose based on your evaluation goal.")
|
421 |
+
gr.HTML(value="""<h3>Agent name</h3>""", elem_classes="form-label")
|
422 |
+
agent_name_tb = gr.Textbox(label="This is how your agent will appear on the leaderboard. Use a clear, descriptive name (e.g., Asta Scholar QA, Perplexity Deep Research). Omit model names (e.g. GPT-4, Mistral) as they’ll be shown automatically based on your logs.")
|
423 |
+
gr.HTML(value="""<h3>Agent description</h3>""", elem_classes="form-label")
|
424 |
+
agent_desc_tb = gr.Textbox(label="Briefly describe your agent’s approach, core strategies, or what makes it distinct. This description may appear on the leaderboard.")
|
425 |
+
gr.HTML(value="""<h3>URL</h3>""", elem_classes="form-label")
|
426 |
+
agent_url_tb = gr.Textbox(label="Link to more information about your agent (e.g. GitHub repo, blog post, or website). This optional link may be shown on the leaderboard to let others explore your agent in more depth.")
|
427 |
+
gr.HTML(value="""<h3>Agent openness</h3>""", elem_classes="form-label")
|
428 |
+
openness_radio = gr.Radio(["Open Source","Open Source Open Weights", "API Available", "Closed"], elem_classes="form-label-fieldset", value=None, label="This affects how your submission is categorized on the leaderboard. Choose based on the availability of your code, model weights, or APIs.")
|
429 |
+
gr.HTML(value="""<h3>Agent tooling</h3>""", elem_classes="form-label")
|
430 |
+
degree_of_control_radio = gr.Radio(["Standard","Equivalent", "Fully Custom"], elem_classes="form-label-fieldset",value=None, label="Choose based on the tools and the execution environment your agent used during evaluation.")
|
431 |
+
gr.HTML(value="""<h3>Submission file</h3>""", elem_classes="form-label")
|
432 |
+
gr.HTML("<div id='submission-file-label'>Upload your run file, which is an archive prepared following the instructions in the <a href='https://github.com/allenai/asta-bench?tab=readme-ov-file#submitting-to-the-leaderboard' target='_blank'>README</a> (“Submitting to the Leaderboard”).</div>")
|
433 |
file_upload_comp = gr.File(
|
434 |
+
show_label=False,
|
435 |
file_types=[".gz", ".tar.gz"]
|
436 |
)
|
437 |
+
submit_eval_button = gr.Button("Submit Evaluation", elem_id="submission-button")
|
|
|
|
|
438 |
# Modals for loading spinner, success and error messages
|
439 |
with Modal(visible=False, elem_id="submission-modal") as loading_modal:
|
440 |
with gr.Column(elem_id="submission-modal-content"):
|
|
|
464 |
degree_of_control_radio,
|
465 |
file_upload_comp,
|
466 |
username_tb,
|
467 |
+
role_selection,
|
468 |
+
mail_tb,
|
469 |
+
mail_opt_in
|
470 |
],
|
471 |
[error_message, error_modal, success_modal, loading_modal],
|
472 |
)
|