get model name and description
Browse files
app.py
CHANGED
@@ -119,8 +119,19 @@ with gr.Blocks() as demo:
|
|
119 |
username_input = gr.Textbox(
|
120 |
label="Username",
|
121 |
placeholder="Enter your Hugging Face username",
|
|
|
|
|
|
|
|
|
|
|
122 |
info="This will be displayed on the leaderboard.",
|
123 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
with gr.Column():
|
125 |
submission_type_dropdown = gr.Dropdown(
|
126 |
choices=["GDPa1", "GDPa1_cross_validation"],
|
@@ -171,7 +182,13 @@ with gr.Blocks() as demo:
|
|
171 |
|
172 |
submit_btn.click(
|
173 |
make_submission,
|
174 |
-
inputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
outputs=[message],
|
176 |
).then(
|
177 |
fn=show_output_box,
|
|
|
119 |
username_input = gr.Textbox(
|
120 |
label="Username",
|
121 |
placeholder="Enter your Hugging Face username",
|
122 |
+
info="This will be used to track your submissions, and used to add to or update your results if you submit again.",
|
123 |
+
)
|
124 |
+
model_name_input = gr.Textbox(
|
125 |
+
label="Model Name",
|
126 |
+
placeholder="Enter your model name (e.g., 'MyProteinLM-v1')",
|
127 |
info="This will be displayed on the leaderboard.",
|
128 |
)
|
129 |
+
model_description_input = gr.Textbox(
|
130 |
+
label="Model Description",
|
131 |
+
placeholder="Brief description of your model and approach",
|
132 |
+
info="Describe your model, training data, or methodology.",
|
133 |
+
lines=3,
|
134 |
+
)
|
135 |
with gr.Column():
|
136 |
submission_type_dropdown = gr.Dropdown(
|
137 |
choices=["GDPa1", "GDPa1_cross_validation"],
|
|
|
182 |
|
183 |
submit_btn.click(
|
184 |
make_submission,
|
185 |
+
inputs=[
|
186 |
+
submission_file,
|
187 |
+
user_state,
|
188 |
+
submission_type_state,
|
189 |
+
model_name_input,
|
190 |
+
model_description_input,
|
191 |
+
],
|
192 |
outputs=[message],
|
193 |
).then(
|
194 |
fn=show_output_box,
|
submit.py
CHANGED
@@ -15,12 +15,21 @@ def make_submission(
|
|
15 |
submitted_file: BinaryIO,
|
16 |
user_state,
|
17 |
submission_type: str = "GDPa1",
|
|
|
|
|
18 |
):
|
19 |
if user_state is None:
|
20 |
-
raise gr.Error("
|
21 |
|
22 |
validate_username(user_state)
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
if submitted_file is None:
|
25 |
raise gr.Error("Please upload a CSV file before submitting.")
|
26 |
|
@@ -51,6 +60,8 @@ def make_submission(
|
|
51 |
"submission_time": timestamp,
|
52 |
"evaluated": False,
|
53 |
"user": user_state,
|
|
|
|
|
54 |
"csv_content": file_content,
|
55 |
"dataset": submission_type,
|
56 |
}
|
|
|
15 |
submitted_file: BinaryIO,
|
16 |
user_state,
|
17 |
submission_type: str = "GDPa1",
|
18 |
+
model_name: str = "",
|
19 |
+
model_description: str = "",
|
20 |
):
|
21 |
if user_state is None:
|
22 |
+
raise gr.Error("Please enter your username to submit a file.")
|
23 |
|
24 |
validate_username(user_state)
|
25 |
|
26 |
+
model_name = model_name.strip()
|
27 |
+
model_description = model_description.strip()
|
28 |
+
|
29 |
+
if not model_name:
|
30 |
+
raise gr.Error("Please provide a model name.")
|
31 |
+
if not model_description:
|
32 |
+
raise gr.Error("Please provide a model description.")
|
33 |
if submitted_file is None:
|
34 |
raise gr.Error("Please upload a CSV file before submitting.")
|
35 |
|
|
|
60 |
"submission_time": timestamp,
|
61 |
"evaluated": False,
|
62 |
"user": user_state,
|
63 |
+
"model_name": model_name,
|
64 |
+
"model_description": model_description,
|
65 |
"csv_content": file_content,
|
66 |
"dataset": submission_type,
|
67 |
}
|