Spaces:
Running
Running
added button for relaxed in submission
Browse files
app.py
CHANGED
|
@@ -131,7 +131,8 @@ def update_leaderboard(show_percentage, selected_groups, compact_view, cached_df
|
|
| 131 |
def show_output_box(message):
|
| 132 |
return gr.update(value=message, visible=True)
|
| 133 |
|
| 134 |
-
def submit_cif_files(problem_type, cif_files, profile: gr.OAuthProfile | None):
|
|
|
|
| 135 |
return
|
| 136 |
|
| 137 |
def generate_metric_legend_html():
|
|
@@ -288,7 +289,13 @@ def gradio_interface() -> gr.Blocks:
|
|
| 288 |
with gr.Column():
|
| 289 |
problem_type = gr.Dropdown(PROBLEM_TYPES, label="Problem Type")
|
| 290 |
with gr.Column():
|
| 291 |
-
cif_file = gr.File(label="Upload a CSV, a pkl, or a ZIP of CIF files.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
|
| 293 |
submit_btn = gr.Button("Submission")
|
| 294 |
message = gr.Textbox(label="Status", lines=1, visible=False)
|
|
@@ -297,7 +304,7 @@ def gradio_interface() -> gr.Blocks:
|
|
| 297 |
|
| 298 |
submit_btn.click(
|
| 299 |
submit_cif_files,
|
| 300 |
-
inputs=[problem_type, cif_file],
|
| 301 |
outputs=[message, filename],
|
| 302 |
).then(
|
| 303 |
fn=show_output_box,
|
|
|
|
| 131 |
def show_output_box(message):
|
| 132 |
return gr.update(value=message, visible=True)
|
| 133 |
|
| 134 |
+
def submit_cif_files(problem_type, cif_files, relaxed, profile: gr.OAuthProfile | None):
|
| 135 |
+
# TODO: Implement submission logic that includes the relaxed flag
|
| 136 |
return
|
| 137 |
|
| 138 |
def generate_metric_legend_html():
|
|
|
|
| 289 |
with gr.Column():
|
| 290 |
problem_type = gr.Dropdown(PROBLEM_TYPES, label="Problem Type")
|
| 291 |
with gr.Column():
|
| 292 |
+
cif_file = gr.File(label="Upload a CSV, a pkl, or a ZIP of CIF files.")
|
| 293 |
+
|
| 294 |
+
relaxed = gr.Checkbox(
|
| 295 |
+
value=False,
|
| 296 |
+
label="Structures are already relaxed",
|
| 297 |
+
info="Check this box if your submitted structures have already been relaxed"
|
| 298 |
+
)
|
| 299 |
|
| 300 |
submit_btn = gr.Button("Submission")
|
| 301 |
message = gr.Textbox(label="Status", lines=1, visible=False)
|
|
|
|
| 304 |
|
| 305 |
submit_btn.click(
|
| 306 |
submit_cif_files,
|
| 307 |
+
inputs=[problem_type, cif_file, relaxed],
|
| 308 |
outputs=[message, filename],
|
| 309 |
).then(
|
| 310 |
fn=show_output_box,
|