Commit
·
1de74c6
1
Parent(s):
3e8741e
Added back anon checkbox
Browse files
app.py
CHANGED
@@ -149,6 +149,11 @@ with gr.Blocks() as demo:
|
|
149 |
info="Describe your model, training data, or methodology.",
|
150 |
lines=3,
|
151 |
)
|
|
|
|
|
|
|
|
|
|
|
152 |
with gr.Column():
|
153 |
submission_type_dropdown = gr.Dropdown(
|
154 |
choices=["GDPa1", "GDPa1_cross_validation"],
|
@@ -206,6 +211,7 @@ with gr.Blocks() as demo:
|
|
206 |
submission_type_state,
|
207 |
model_name_input,
|
208 |
model_description_input,
|
|
|
209 |
],
|
210 |
outputs=[message],
|
211 |
).then(
|
|
|
149 |
info="Describe your model, training data, or methodology.",
|
150 |
lines=3,
|
151 |
)
|
152 |
+
anonymous_checkbox = gr.Checkbox(
|
153 |
+
label="Anonymous",
|
154 |
+
value=False,
|
155 |
+
info="If checked, your username will be replaced with an anonymous username on the leaderboard.",
|
156 |
+
)
|
157 |
with gr.Column():
|
158 |
submission_type_dropdown = gr.Dropdown(
|
159 |
choices=["GDPa1", "GDPa1_cross_validation"],
|
|
|
211 |
submission_type_state,
|
212 |
model_name_input,
|
213 |
model_description_input,
|
214 |
+
anonymous_checkbox,
|
215 |
],
|
216 |
outputs=[message],
|
217 |
).then(
|
submit.py
CHANGED
@@ -18,6 +18,7 @@ def upload_submission(
|
|
18 |
submission_type: str,
|
19 |
model_name: str,
|
20 |
model_description: str,
|
|
|
21 |
):
|
22 |
timestamp = datetime.now(timezone.utc).isoformat()
|
23 |
date = datetime.now(timezone.utc).date().isoformat()
|
@@ -41,6 +42,7 @@ def upload_submission(
|
|
41 |
"model_description": model_description,
|
42 |
"csv_content": file_content,
|
43 |
"dataset": submission_type,
|
|
|
44 |
}
|
45 |
with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as tmp:
|
46 |
json.dump(record, tmp, indent=2)
|
@@ -62,6 +64,7 @@ def make_submission(
|
|
62 |
submission_type: str = "GDPa1",
|
63 |
model_name: str = "",
|
64 |
model_description: str = "",
|
|
|
65 |
):
|
66 |
user_state = user_state
|
67 |
validate_username(user_state)
|
@@ -93,6 +96,7 @@ def make_submission(
|
|
93 |
submission_type=submission_type,
|
94 |
model_name=model_name,
|
95 |
model_description=model_description,
|
|
|
96 |
)
|
97 |
|
98 |
return "✅ Your submission has been received! Sit tight and your scores will appear on the leaderboard shortly."
|
|
|
18 |
submission_type: str,
|
19 |
model_name: str,
|
20 |
model_description: str,
|
21 |
+
anonymous: bool = False,
|
22 |
):
|
23 |
timestamp = datetime.now(timezone.utc).isoformat()
|
24 |
date = datetime.now(timezone.utc).date().isoformat()
|
|
|
42 |
"model_description": model_description,
|
43 |
"csv_content": file_content,
|
44 |
"dataset": submission_type,
|
45 |
+
"anonymous": anonymous,
|
46 |
}
|
47 |
with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as tmp:
|
48 |
json.dump(record, tmp, indent=2)
|
|
|
64 |
submission_type: str = "GDPa1",
|
65 |
model_name: str = "",
|
66 |
model_description: str = "",
|
67 |
+
anonymous: bool = False,
|
68 |
):
|
69 |
user_state = user_state
|
70 |
validate_username(user_state)
|
|
|
96 |
submission_type=submission_type,
|
97 |
model_name=model_name,
|
98 |
model_description=model_description,
|
99 |
+
anonymous=anonymous,
|
100 |
)
|
101 |
|
102 |
return "✅ Your submission has been received! Sit tight and your scores will appear on the leaderboard shortly."
|