loodvanniekerkginkgo commited on
Commit
471531b
·
1 Parent(s): 1de74c6

Giving the registration code a go on the live website

Browse files
Files changed (3) hide show
  1. app.py +6 -0
  2. constants.py +2 -0
  3. submit.py +5 -2
app.py CHANGED
@@ -154,6 +154,11 @@ with gr.Blocks() as demo:
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"],
@@ -212,6 +217,7 @@ with gr.Blocks() as demo:
212
  model_name_input,
213
  model_description_input,
214
  anonymous_checkbox,
 
215
  ],
216
  outputs=[message],
217
  ).then(
 
154
  value=False,
155
  info="If checked, your username will be replaced with an anonymous username on the leaderboard.",
156
  )
157
+ registration_code = gr.Textbox(
158
+ label="Registration Code",
159
+ placeholder="Enter your registration code",
160
+ info="If you did not receive a registration code, please sign up on the <a href='https://datapoints.ginkgo.bio/ai-competitions/2025-abdev-competition'>Competition Registration page</a> or email <a href='mailto:[email protected]'>[email protected]</a>.",
161
+ )
162
  with gr.Column():
163
  submission_type_dropdown = gr.Dropdown(
164
  choices=["GDPa1", "GDPa1_cross_validation"],
 
217
  model_name_input,
218
  model_description_input,
219
  anonymous_checkbox,
220
+ registration_code,
221
  ],
222
  outputs=[message],
223
  ).then(
constants.py CHANGED
@@ -29,6 +29,8 @@ ASSAY_EMOJIS = {
29
  "Titer": "🧪",
30
  }
31
 
 
 
32
  # Input CSV file requirements
33
  REQUIRED_COLUMNS: list[str] = [
34
  "antibody_name",
 
29
  "Titer": "🧪",
30
  }
31
 
32
+ REGISTRATION_CODE = "GINKGO-ABDEV-2025"
33
+
34
  # Input CSV file requirements
35
  REQUIRED_COLUMNS: list[str] = [
36
  "antibody_name",
submit.py CHANGED
@@ -8,7 +8,7 @@ import gradio as gr
8
  from datetime import datetime, timezone
9
  import uuid
10
 
11
- from constants import API, SUBMISSIONS_REPO
12
  from validation import validate_csv_file, validate_username
13
 
14
 
@@ -65,6 +65,7 @@ def make_submission(
65
  model_name: str = "",
66
  model_description: str = "",
67
  anonymous: bool = False,
 
68
  ):
69
  user_state = user_state
70
  validate_username(user_state)
@@ -76,7 +77,9 @@ def make_submission(
76
  raise gr.Error("Please provide a model name.")
77
  if not model_description:
78
  model_description = ""
79
- # raise gr.Error("Please provide a model description.")
 
 
80
  if submitted_file is None:
81
  raise gr.Error("Please upload a CSV file before submitting.")
82
 
 
8
  from datetime import datetime, timezone
9
  import uuid
10
 
11
+ from constants import API, SUBMISSIONS_REPO, REGISTRATION_CODE
12
  from validation import validate_csv_file, validate_username
13
 
14
 
 
65
  model_name: str = "",
66
  model_description: str = "",
67
  anonymous: bool = False,
68
+ registration_code: str = "",
69
  ):
70
  user_state = user_state
71
  validate_username(user_state)
 
77
  raise gr.Error("Please provide a model name.")
78
  if not model_description:
79
  model_description = ""
80
+ # raise gr.Error("Please provide a model description.") # Not mandatory anymore
81
+ if str(registration_code).strip().upper() != REGISTRATION_CODE:
82
+ raise gr.Error("Invalid registration code. Please register on the <a href='https://datapoints.ginkgo.bio/ai-competitions/2025-abdev-competition'>Competition Registration page</a> or email <a href='mailto:[email protected]'>[email protected]</a>.")
83
  if submitted_file is None:
84
  raise gr.Error("Please upload a CSV file before submitting.")
85