Spaces:
Running
Running
Shiyu Zhao
commited on
Commit
·
f3d9900
1
Parent(s):
01a5da3
Update space
Browse files- app.py +14 -12
- submissions/ance_test2_tester2/latest.json +0 -6
- submissions/ance_test2_tester2/metadata_20241024_002542.json +0 -20
- submissions/ance_test2_tester2/predictions_20241024_002542.csv +0 -0
- submissions/ance_test_tester1/latest.json +0 -6
- submissions/ance_test_tester1/metadata_20241024_000440.json +0 -20
- submissions/ance_test_tester1/predictions_20241024_000440.csv +0 -0
app.py
CHANGED
@@ -675,9 +675,7 @@ def process_submission(
|
|
675 |
# send_submission_confirmation(meta_data, processed_results)
|
676 |
update_leaderboard_data(submission_data)
|
677 |
|
678 |
-
#
|
679 |
-
model_type_filter.update()
|
680 |
-
|
681 |
return f"""
|
682 |
Submission successful!
|
683 |
|
@@ -692,6 +690,8 @@ def process_submission(
|
|
692 |
|
693 |
You can find your submission at:
|
694 |
https://huggingface.co/spaces/{REPO_ID}/tree/main/submissions/{folder_name}
|
|
|
|
|
695 |
"""
|
696 |
|
697 |
except Exception as e:
|
@@ -707,6 +707,7 @@ def process_submission(
|
|
707 |
except Exception as e:
|
708 |
print(f"Warning: Failed to delete temporary file {temp_file}: {str(e)}")
|
709 |
|
|
|
710 |
def filter_by_model_type(df, selected_types):
|
711 |
if not selected_types:
|
712 |
return df.head(0)
|
@@ -861,25 +862,26 @@ with gr.Blocks(css=css) as demo:
|
|
861 |
outputs=all_dfs
|
862 |
)
|
863 |
|
864 |
-
#
|
865 |
-
demo.load(
|
866 |
-
update_tables,
|
867 |
-
inputs=[model_type_filter],
|
868 |
-
outputs=all_dfs
|
869 |
-
)
|
870 |
-
|
871 |
submit_btn.click(
|
872 |
fn=process_submission,
|
873 |
inputs=[
|
874 |
method_name, team_name, dataset, split, contact_email,
|
875 |
code_repo, csv_file, model_description, hardware, paper_link
|
876 |
],
|
877 |
-
outputs=result
|
878 |
-
).
|
879 |
fn=update_tables,
|
880 |
inputs=[model_type_filter],
|
881 |
outputs=all_dfs
|
882 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
883 |
|
884 |
|
885 |
# Launch the application
|
|
|
675 |
# send_submission_confirmation(meta_data, processed_results)
|
676 |
update_leaderboard_data(submission_data)
|
677 |
|
678 |
+
# Return success message
|
|
|
|
|
679 |
return f"""
|
680 |
Submission successful!
|
681 |
|
|
|
690 |
|
691 |
You can find your submission at:
|
692 |
https://huggingface.co/spaces/{REPO_ID}/tree/main/submissions/{folder_name}
|
693 |
+
|
694 |
+
Please refresh the page to see your submission in the leaderboard.
|
695 |
"""
|
696 |
|
697 |
except Exception as e:
|
|
|
707 |
except Exception as e:
|
708 |
print(f"Warning: Failed to delete temporary file {temp_file}: {str(e)}")
|
709 |
|
710 |
+
|
711 |
def filter_by_model_type(df, selected_types):
|
712 |
if not selected_types:
|
713 |
return df.head(0)
|
|
|
862 |
outputs=all_dfs
|
863 |
)
|
864 |
|
865 |
+
# Event handler for submission button
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
submit_btn.click(
|
867 |
fn=process_submission,
|
868 |
inputs=[
|
869 |
method_name, team_name, dataset, split, contact_email,
|
870 |
code_repo, csv_file, model_description, hardware, paper_link
|
871 |
],
|
872 |
+
outputs=result
|
873 |
+
).success( # Add a success handler to update tables after successful submission
|
874 |
fn=update_tables,
|
875 |
inputs=[model_type_filter],
|
876 |
outputs=all_dfs
|
877 |
)
|
878 |
+
|
879 |
+
# Initial table update
|
880 |
+
demo.load(
|
881 |
+
update_tables,
|
882 |
+
inputs=[model_type_filter],
|
883 |
+
outputs=all_dfs
|
884 |
+
)
|
885 |
|
886 |
|
887 |
# Launch the application
|
submissions/ance_test2_tester2/latest.json
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"latest_submission": "20241024_002542",
|
3 |
-
"status": "approved",
|
4 |
-
"method_name": "ance-test2",
|
5 |
-
"team_name": "tester2"
|
6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submissions/ance_test2_tester2/metadata_20241024_002542.json
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"Method Name": "ance-test2",
|
3 |
-
"Team Name": "tester2",
|
4 |
-
"Dataset": "amazon",
|
5 |
-
"Split": "human_generated_eval",
|
6 |
-
"Contact Email(s)": "shiyuz@stanford.edu",
|
7 |
-
"Code Repository": "https://github.com/snap-stanford/stark",
|
8 |
-
"Model Description": "tester2",
|
9 |
-
"Hardware": "a100",
|
10 |
-
"(Optional) Paper link": "",
|
11 |
-
"results": {
|
12 |
-
"hit@1": 25.93,
|
13 |
-
"hit@5": 54.32,
|
14 |
-
"recall@20": 23.69,
|
15 |
-
"mrr": 37.08
|
16 |
-
},
|
17 |
-
"status": "approved",
|
18 |
-
"submission_date": "2024-10-24 00:26:15",
|
19 |
-
"csv_path": "submissions/ance_test2_tester2/predictions_20241024_002542.csv"
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submissions/ance_test2_tester2/predictions_20241024_002542.csv
DELETED
The diff for this file is too large to render.
See raw diff
|
|
submissions/ance_test_tester1/latest.json
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"latest_submission": "20241024_000440",
|
3 |
-
"status": "approved",
|
4 |
-
"method_name": "ance-test",
|
5 |
-
"team_name": "tester1"
|
6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submissions/ance_test_tester1/metadata_20241024_000440.json
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"Method Name": "ance-test",
|
3 |
-
"Team Name": "tester1",
|
4 |
-
"Dataset": "amazon",
|
5 |
-
"Split": "human_generated_eval",
|
6 |
-
"Contact Email(s)": "shiyuz@stanford.edu",
|
7 |
-
"Code Repository": "https://github.com/snap-stanford/stark",
|
8 |
-
"Model Description": "tester1",
|
9 |
-
"Hardware": "a100",
|
10 |
-
"(Optional) Paper link": "",
|
11 |
-
"results": {
|
12 |
-
"hit@1": 25.93,
|
13 |
-
"hit@5": 54.32,
|
14 |
-
"recall@20": 23.69,
|
15 |
-
"mrr": 37.08
|
16 |
-
},
|
17 |
-
"status": "approved",
|
18 |
-
"submission_date": "2024-10-24 00:05:13",
|
19 |
-
"csv_path": "submissions/ance_test_tester1/predictions_20241024_000440.csv"
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submissions/ance_test_tester1/predictions_20241024_000440.csv
DELETED
The diff for this file is too large to render.
See raw diff
|
|