Spaces:
Running
Running
Fix submission field bug (#78)
Browse files- submission.py +7 -2
submission.py
CHANGED
@@ -100,7 +100,9 @@ def add_new_eval(
|
|
100 |
degree_of_control: str | None,
|
101 |
path_to_file: tempfile._TemporaryFileWrapper | None,
|
102 |
username: str,
|
|
|
103 |
email: str,
|
|
|
104 |
profile: gr.OAuthProfile,
|
105 |
):
|
106 |
if not agent_name:
|
@@ -269,6 +271,9 @@ def add_new_eval(
|
|
269 |
contact_info["submit_time"] = submission_time.isoformat()
|
270 |
contact_info["username_auth"] = profile.username
|
271 |
contact_info["email"] = email
|
|
|
|
|
|
|
272 |
|
273 |
logger.debug(f"agent {agent_name}: Contact info: {contact_info}")
|
274 |
if val_or_test in contact_infos:
|
@@ -396,7 +401,7 @@ def build_page():
|
|
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 |
-
|
400 |
interactive=True,
|
401 |
choices=[
|
402 |
"Undergraduate Student",
|
@@ -464,7 +469,7 @@ def build_page():
|
|
464 |
degree_of_control_radio,
|
465 |
file_upload_comp,
|
466 |
username_tb,
|
467 |
-
|
468 |
mail_tb,
|
469 |
mail_opt_in
|
470 |
],
|
|
|
100 |
degree_of_control: str | None,
|
101 |
path_to_file: tempfile._TemporaryFileWrapper | None,
|
102 |
username: str,
|
103 |
+
role: str,
|
104 |
email: str,
|
105 |
+
email_opt_in: bool,
|
106 |
profile: gr.OAuthProfile,
|
107 |
):
|
108 |
if not agent_name:
|
|
|
271 |
contact_info["submit_time"] = submission_time.isoformat()
|
272 |
contact_info["username_auth"] = profile.username
|
273 |
contact_info["email"] = email
|
274 |
+
contact_info["email_opt_in"] = email_opt_in,
|
275 |
+
contact_info["role"] = role,
|
276 |
+
contact_info
|
277 |
|
278 |
logger.debug(f"agent {agent_name}: Contact info: {contact_info}")
|
279 |
if val_or_test in contact_infos:
|
|
|
401 |
gr.HTML(value="""<h3>Username</h3>""", elem_classes="form-label")
|
402 |
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).")
|
403 |
gr.HTML(value="""<h3>Role</h3>""", elem_classes="form-label")
|
404 |
+
role = 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.",
|
405 |
interactive=True,
|
406 |
choices=[
|
407 |
"Undergraduate Student",
|
|
|
469 |
degree_of_control_radio,
|
470 |
file_upload_comp,
|
471 |
username_tb,
|
472 |
+
role,
|
473 |
mail_tb,
|
474 |
mail_opt_in
|
475 |
],
|