forcing reload of dataset, filter users with name test, and add note for where to register issues
Browse files
app.py
CHANGED
@@ -34,12 +34,13 @@ def evaluate_boundary(filename):
|
|
34 |
return
|
35 |
|
36 |
def get_leaderboard():
|
37 |
-
ds = load_dataset(results_repo, split='train')
|
38 |
full_df = pd.DataFrame(ds)
|
39 |
full_df['full results'] = full_df['result_filename'].apply(lambda x: make_boundary_clickable(x)).astype(str)
|
40 |
|
41 |
full_df.rename(columns={'submission_time': 'submission time', 'problem_type': 'problem type'}, inplace=True)
|
42 |
to_show = full_df.copy(deep=True)
|
|
|
43 |
to_show = to_show[['submission time', 'problem type', 'user', 'score', 'full results']]
|
44 |
to_show['user'] = to_show['user'].apply(lambda x: make_user_clickable(x)).astype(str)
|
45 |
|
@@ -166,6 +167,9 @@ def gradio_interface() -> gr.Blocks:
|
|
166 |
|
167 |
submit_btn = gr.Button("Evaluate")
|
168 |
message = gr.Textbox(label="Status", lines=1, visible=False)
|
|
|
|
|
|
|
169 |
submit_btn.click(
|
170 |
submit_boundary,
|
171 |
inputs=[problem_type, boundary_file, user_state],
|
|
|
34 |
return
|
35 |
|
36 |
def get_leaderboard():
|
37 |
+
ds = load_dataset(results_repo, split='train', download_mode="force_redownload")
|
38 |
full_df = pd.DataFrame(ds)
|
39 |
full_df['full results'] = full_df['result_filename'].apply(lambda x: make_boundary_clickable(x)).astype(str)
|
40 |
|
41 |
full_df.rename(columns={'submission_time': 'submission time', 'problem_type': 'problem type'}, inplace=True)
|
42 |
to_show = full_df.copy(deep=True)
|
43 |
+
to_show = to_show[to_show['user'] != 'test']
|
44 |
to_show = to_show[['submission time', 'problem type', 'user', 'score', 'full results']]
|
45 |
to_show['user'] = to_show['user'].apply(lambda x: make_user_clickable(x)).astype(str)
|
46 |
|
|
|
167 |
|
168 |
submit_btn = gr.Button("Evaluate")
|
169 |
message = gr.Textbox(label="Status", lines=1, visible=False)
|
170 |
+
gr.Markdown(
|
171 |
+
"If you have issues with submission or using the leaderboard, please start a discussion in the Community tab of this Space."
|
172 |
+
)
|
173 |
submit_btn.click(
|
174 |
submit_boundary,
|
175 |
inputs=[problem_type, boundary_file, user_state],
|