Commit
·
7ac33bb
1
Parent(s):
fafd10e
Test set submission working
Browse files- app.py +2 -3
- constants.py +2 -2
app.py
CHANGED
@@ -30,7 +30,6 @@ def get_leaderboard_object(assay: str | None = None):
|
|
30 |
# TODO how to sort filter columns alphabetically?
|
31 |
# Bug: Can't leave search_columns empty because then it says "Column None not found in headers"
|
32 |
# Note(Lood): Would be nice to make it clear that the Search Column is searching on model name
|
33 |
-
# TODO(Lood) check that this actually refreshes using the function
|
34 |
lb = Leaderboard(
|
35 |
value=format_leaderboard_table(df_results=current_dataframe, assay=assay),
|
36 |
datatype=["str", "str", "str", "number"],
|
@@ -161,7 +160,7 @@ with gr.Blocks() as demo:
|
|
161 |
)
|
162 |
with gr.Column():
|
163 |
submission_type_dropdown = gr.Dropdown(
|
164 |
-
choices=["GDPa1", "GDPa1_cross_validation"],
|
165 |
value="GDPa1",
|
166 |
label="Submission Type",
|
167 |
)
|
@@ -179,7 +178,7 @@ with gr.Blocks() as demo:
|
|
179 |
Dynamically update example file for download
|
180 |
"""
|
181 |
download_file = EXAMPLE_FILE_DICT.get(
|
182 |
-
submission_type, EXAMPLE_FILE_DICT[
|
183 |
)
|
184 |
download_label = (
|
185 |
f"📥 Download example submission CSV for {submission_type}"
|
|
|
30 |
# TODO how to sort filter columns alphabetically?
|
31 |
# Bug: Can't leave search_columns empty because then it says "Column None not found in headers"
|
32 |
# Note(Lood): Would be nice to make it clear that the Search Column is searching on model name
|
|
|
33 |
lb = Leaderboard(
|
34 |
value=format_leaderboard_table(df_results=current_dataframe, assay=assay),
|
35 |
datatype=["str", "str", "str", "number"],
|
|
|
160 |
)
|
161 |
with gr.Column():
|
162 |
submission_type_dropdown = gr.Dropdown(
|
163 |
+
choices=["GDPa1", "GDPa1_cross_validation", "Heldout Test Set"],
|
164 |
value="GDPa1",
|
165 |
label="Submission Type",
|
166 |
)
|
|
|
178 |
Dynamically update example file for download
|
179 |
"""
|
180 |
download_file = EXAMPLE_FILE_DICT.get(
|
181 |
+
submission_type, EXAMPLE_FILE_DICT[submission_type]
|
182 |
)
|
183 |
download_label = (
|
184 |
f"📥 Download example submission CSV for {submission_type}"
|
constants.py
CHANGED
@@ -43,14 +43,14 @@ CV_COLUMN = "hierarchical_cluster_IgG_isotype_stratified_fold"
|
|
43 |
EXAMPLE_FILE_DICT = {
|
44 |
"GDPa1": "data/example-predictions.csv",
|
45 |
"GDPa1_cross_validation": "data/example-predictions-cv.csv",
|
46 |
-
"
|
47 |
}
|
48 |
ANTIBODY_NAMES_DICT = {
|
49 |
"GDPa1": pd.read_csv(EXAMPLE_FILE_DICT["GDPa1"])["antibody_name"].tolist(),
|
50 |
"GDPa1_cross_validation": pd.read_csv(EXAMPLE_FILE_DICT["GDPa1_cross_validation"])[
|
51 |
"antibody_name"
|
52 |
].tolist(),
|
53 |
-
"
|
54 |
}
|
55 |
|
56 |
# Huggingface API
|
|
|
43 |
EXAMPLE_FILE_DICT = {
|
44 |
"GDPa1": "data/example-predictions.csv",
|
45 |
"GDPa1_cross_validation": "data/example-predictions-cv.csv",
|
46 |
+
"Heldout Test Set": "data/example-predictions-heldout.csv",
|
47 |
}
|
48 |
ANTIBODY_NAMES_DICT = {
|
49 |
"GDPa1": pd.read_csv(EXAMPLE_FILE_DICT["GDPa1"])["antibody_name"].tolist(),
|
50 |
"GDPa1_cross_validation": pd.read_csv(EXAMPLE_FILE_DICT["GDPa1_cross_validation"])[
|
51 |
"antibody_name"
|
52 |
].tolist(),
|
53 |
+
"Heldout Test Set": pd.read_csv(EXAMPLE_FILE_DICT["Heldout Test Set"])["antibody_name"].tolist(),
|
54 |
}
|
55 |
|
56 |
# Huggingface API
|