Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update space.py
Browse files
space.py
CHANGED
@@ -21,20 +21,24 @@ df["Model Size"] = params_column.apply(
|
|
21 |
with gr.Blocks() as demo:
|
22 |
gr.Markdown("""
|
23 |
# 🥇 Leaderboard Component
|
24 |
-
Please read the documentation [here](https://huggingface.co/spaces/freddyaboulton/gradio_leaderboard/blob/main/README.md)
|
25 |
""")
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
if __name__ == "__main__":
|
40 |
demo.launch()
|
|
|
21 |
with gr.Blocks() as demo:
|
22 |
gr.Markdown("""
|
23 |
# 🥇 Leaderboard Component
|
|
|
24 |
""")
|
25 |
+
with gr.Tabs():
|
26 |
+
with gr.Tab("Demo"):
|
27 |
+
Leaderboard(
|
28 |
+
value=df,
|
29 |
+
select_columns=SelectColumns(
|
30 |
+
default_selection=config.ON_LOAD_COLUMNS,
|
31 |
+
cant_deselect=["T", "Model"],
|
32 |
+
label="Select Columns to Display:",
|
33 |
+
),
|
34 |
+
search_columns=["model_name_for_query", "Type"],
|
35 |
+
hide_columns=["model_name_for_query", "Model Size"],
|
36 |
+
filter_columns=config.FILTER_COLUMNS,
|
37 |
+
datatype=config.TYPES,
|
38 |
+
column_widths=["2%", "33%"],
|
39 |
+
)
|
40 |
+
with gr.Tab("Docs"):
|
41 |
+
gr.Markdown((Path(__file__).parent / "docs.md").read_text())
|
42 |
|
43 |
if __name__ == "__main__":
|
44 |
demo.launch()
|