Commit
·
fe04bb9
1
Parent(s):
9021dc4
Trying other dataloader
Browse files
app.py
CHANGED
|
@@ -19,14 +19,14 @@ def format_leaderboard_table(df_results: pd.DataFrame, assay: str | None = None)
|
|
| 19 |
df = df[column_order]
|
| 20 |
return df.sort_values(by="spearman", ascending=False)
|
| 21 |
|
| 22 |
-
def get_leaderboard_object(
|
| 23 |
-
df = format_leaderboard_table(df_results=df_results, assay=assay)
|
| 24 |
filter_columns = ["model"]
|
| 25 |
if assay is None:
|
| 26 |
filter_columns.append("property")
|
| 27 |
# TODO how to sort filter columns alphabetically?
|
| 28 |
Leaderboard(
|
| 29 |
-
|
|
|
|
| 30 |
datatype=["str", "str", "str", "number"],
|
| 31 |
select_columns=["model", "property", "spearman", "spearman_cross_val"],
|
| 32 |
search_columns=["model"],
|
|
@@ -42,17 +42,16 @@ with gr.Blocks() as demo:
|
|
| 42 |
Participants can submit their model to the leaderboard by uploading a CSV file (see the "✉️ Submit" tab).
|
| 43 |
See more details in the "❔About" tab.
|
| 44 |
""")
|
| 45 |
-
df = fetch_hf_results()
|
| 46 |
with gr.Tabs(elem_classes="tab-buttons"):
|
| 47 |
# Procedurally make these 5 tabs
|
| 48 |
for assay in ASSAY_LIST:
|
| 49 |
with gr.TabItem(f"{ASSAY_EMOJIS[assay]} {ASSAY_RENAME[assay]}", elem_id=f"abdev-benchmark-tab-table"):
|
| 50 |
gr.Markdown(f"# {ASSAY_DESCRIPTION[assay]}")
|
| 51 |
-
get_leaderboard_object(
|
| 52 |
|
| 53 |
with gr.TabItem("🚀 Overall", elem_id="abdev-benchmark-tab-table"):
|
| 54 |
gr.Markdown("# Antibody Developability Benchmark Leaderboard over all properties")
|
| 55 |
-
get_leaderboard_object(
|
| 56 |
# TODO: this is not going to update well, need to fix
|
| 57 |
|
| 58 |
with gr.TabItem("❔About", elem_id="abdev-benchmark-tab-table"):
|
|
|
|
| 19 |
df = df[column_order]
|
| 20 |
return df.sort_values(by="spearman", ascending=False)
|
| 21 |
|
| 22 |
+
def get_leaderboard_object(assay: str | None = None):
|
|
|
|
| 23 |
filter_columns = ["model"]
|
| 24 |
if assay is None:
|
| 25 |
filter_columns.append("property")
|
| 26 |
# TODO how to sort filter columns alphabetically?
|
| 27 |
Leaderboard(
|
| 28 |
+
# TODO(Lood) check refreshing
|
| 29 |
+
value=format_leaderboard_table(df_results=fetch_hf_results(), assay=assay),
|
| 30 |
datatype=["str", "str", "str", "number"],
|
| 31 |
select_columns=["model", "property", "spearman", "spearman_cross_val"],
|
| 32 |
search_columns=["model"],
|
|
|
|
| 42 |
Participants can submit their model to the leaderboard by uploading a CSV file (see the "✉️ Submit" tab).
|
| 43 |
See more details in the "❔About" tab.
|
| 44 |
""")
|
|
|
|
| 45 |
with gr.Tabs(elem_classes="tab-buttons"):
|
| 46 |
# Procedurally make these 5 tabs
|
| 47 |
for assay in ASSAY_LIST:
|
| 48 |
with gr.TabItem(f"{ASSAY_EMOJIS[assay]} {ASSAY_RENAME[assay]}", elem_id=f"abdev-benchmark-tab-table"):
|
| 49 |
gr.Markdown(f"# {ASSAY_DESCRIPTION[assay]}")
|
| 50 |
+
get_leaderboard_object(assay=assay)
|
| 51 |
|
| 52 |
with gr.TabItem("🚀 Overall", elem_id="abdev-benchmark-tab-table"):
|
| 53 |
gr.Markdown("# Antibody Developability Benchmark Leaderboard over all properties")
|
| 54 |
+
get_leaderboard_object()
|
| 55 |
# TODO: this is not going to update well, need to fix
|
| 56 |
|
| 57 |
with gr.TabItem("❔About", elem_id="abdev-benchmark-tab-table"):
|