still trying to make the leaderboard
Browse files
app.py
CHANGED
@@ -123,11 +123,23 @@ def get_leaderboard(problem_type: str):
|
|
123 |
|
124 |
def gradio_interface() -> gr.Blocks:
|
125 |
with gr.Blocks() as demo:
|
126 |
-
with gr.Tabs():
|
127 |
-
with gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
gr.Markdown(
|
129 |
"""
|
130 |
-
# Plasma Boundary Evaluation
|
131 |
Upload your plasma boundary JSON and select the problem type to get your score.
|
132 |
"""
|
133 |
)
|
@@ -145,27 +157,6 @@ def gradio_interface() -> gr.Blocks:
|
|
145 |
inputs=[problem_type, boundary_file],
|
146 |
outputs=output,
|
147 |
)
|
148 |
-
with gr.Tab("Leaderboards"):
|
149 |
-
gr.Markdown("# Leaderboard")
|
150 |
-
leaderboard_type = gr.Dropdown(PROBLEM_TYPES, value="geometrical", label="Problem Type")
|
151 |
-
# refresh_btn = gr.Button("Refresh Leaderboard")
|
152 |
-
leaderboard_df = get_leaderboard(leaderboard_type)
|
153 |
-
# leaderboard_output = gr.Dataframe(label="Leaderboard")
|
154 |
-
|
155 |
-
'''# Trigger refresh when button is clicked
|
156 |
-
refresh_btn.click(
|
157 |
-
lambda pt: get_leaderboard(pt).to_dict(orient="records"),
|
158 |
-
inputs=[leaderboard_type],
|
159 |
-
outputs=[leaderboard_output],
|
160 |
-
)'''
|
161 |
-
|
162 |
-
Leaderboard(
|
163 |
-
value=leaderboard_df,
|
164 |
-
select_columns=["submission_time", "feasibility", "score", "objective"],
|
165 |
-
search_columns=["submission_time", "score"],
|
166 |
-
hide_columns=["result_filename", "submission_filename", "minimize_objective", "boundary_json"],
|
167 |
-
# filter_columns=["T", "Precision", "Model Size"],
|
168 |
-
)
|
169 |
|
170 |
|
171 |
return demo
|
|
|
123 |
|
124 |
def gradio_interface() -> gr.Blocks:
|
125 |
with gr.Blocks() as demo:
|
126 |
+
with gr.Tabs(elem_classes="tab-buttons"):
|
127 |
+
with gr.TabItem("Leaderboard", elem_id="boundary-benchmark-tab-table"):
|
128 |
+
gr.Markdown("# Boundary Design Leaderboard")
|
129 |
+
leaderboard_type = gr.Dropdown(PROBLEM_TYPES, value="geometrical", label="Problem Type")
|
130 |
+
leaderboard_df = get_leaderboard(leaderboard_type)
|
131 |
+
|
132 |
+
Leaderboard(
|
133 |
+
value=leaderboard_df,
|
134 |
+
select_columns=["submission_time", "feasibility", "score", "objective"],
|
135 |
+
search_columns=["submission_time", "score"],
|
136 |
+
hide_columns=["result_filename", "submission_filename", "minimize_objective", "boundary_json"],
|
137 |
+
# filter_columns=["T", "Precision", "Model Size"],
|
138 |
+
)
|
139 |
+
with gr.TabItem("Submit", elem_id="boundary-benchmark-tab-table"):
|
140 |
gr.Markdown(
|
141 |
"""
|
142 |
+
# Plasma Boundary Evaluation Submission
|
143 |
Upload your plasma boundary JSON and select the problem type to get your score.
|
144 |
"""
|
145 |
)
|
|
|
157 |
inputs=[problem_type, boundary_file],
|
158 |
outputs=output,
|
159 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
|
161 |
|
162 |
return demo
|