Spaces:
Running
Running
Commit
Β·
00642fb
1
Parent(s):
34186ca
test
Browse files- app.py +9 -11
- src/assets/text_content.py +1 -0
app.py
CHANGED
|
@@ -31,15 +31,14 @@ def get_benchmark_df(benchmark):
|
|
| 31 |
llm_perf_dataset_repo.git_pull()
|
| 32 |
|
| 33 |
# load
|
| 34 |
-
df = pd.read_csv(
|
|
|
|
| 35 |
# preprocess
|
| 36 |
df["model"] = df["model"].apply(make_clickable_model)
|
| 37 |
# filter
|
| 38 |
df = df[COLUMNS_MAPPING.keys()]
|
| 39 |
# rename
|
| 40 |
-
df.rename(columns=
|
| 41 |
-
df_col: rename_col for df_col, rename_col in COLUMNS_MAPPING.items()
|
| 42 |
-
}, inplace=True)
|
| 43 |
# sort
|
| 44 |
df.sort_values(by=SORTING_COLUMN, ascending=False, inplace=True)
|
| 45 |
|
|
@@ -87,13 +86,12 @@ with demo:
|
|
| 87 |
)
|
| 88 |
|
| 89 |
with gr.Row():
|
| 90 |
-
with gr.
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
).style(show_copy_button=True)
|
| 97 |
|
| 98 |
# Restart space every hour
|
| 99 |
scheduler = BackgroundScheduler()
|
|
|
|
| 31 |
llm_perf_dataset_repo.git_pull()
|
| 32 |
|
| 33 |
# load
|
| 34 |
+
df = pd.read_csv(
|
| 35 |
+
f"./llm-perf-dataset/reports/{benchmark}/inference_report.csv")
|
| 36 |
# preprocess
|
| 37 |
df["model"] = df["model"].apply(make_clickable_model)
|
| 38 |
# filter
|
| 39 |
df = df[COLUMNS_MAPPING.keys()]
|
| 40 |
# rename
|
| 41 |
+
df.rename(columns=COLUMNS_MAPPING, inplace=True)
|
|
|
|
|
|
|
| 42 |
# sort
|
| 43 |
df.sort_values(by=SORTING_COLUMN, ascending=False, inplace=True)
|
| 44 |
|
|
|
|
| 86 |
)
|
| 87 |
|
| 88 |
with gr.Row():
|
| 89 |
+
with gr.Accordion("π Citation", open=False):
|
| 90 |
+
citation_button = gr.Textbox(
|
| 91 |
+
value=CITATION_BUTTON_TEXT,
|
| 92 |
+
label=CITATION_BUTTON_LABEL,
|
| 93 |
+
elem_id="citation-button",
|
| 94 |
+
).style(show_copy_button=True)
|
|
|
|
| 95 |
|
| 96 |
# Restart space every hour
|
| 97 |
scheduler = BackgroundScheduler()
|
src/assets/text_content.py
CHANGED
|
@@ -18,6 +18,7 @@ CITATION_BUTTON_TEXT = r"""@misc{open-llm-perf-leaderboard,
|
|
| 18 |
howpublished = "\url{https://huggingface.co/spaces/optimum/llm-perf-leaderboard}",
|
| 19 |
@software{optimum-benchmark,
|
| 20 |
author = {Ilyas Moutawwakil},
|
|
|
|
| 21 |
title = {A framework for benchmarking the performance of Transformers models on different hardwares and backends},
|
| 22 |
}
|
| 23 |
"""
|
|
|
|
| 18 |
howpublished = "\url{https://huggingface.co/spaces/optimum/llm-perf-leaderboard}",
|
| 19 |
@software{optimum-benchmark,
|
| 20 |
author = {Ilyas Moutawwakil},
|
| 21 |
+
publisher = {Hugging Face},
|
| 22 |
title = {A framework for benchmarking the performance of Transformers models on different hardwares and backends},
|
| 23 |
}
|
| 24 |
"""
|