Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Rephrase some elements
Browse files
app.py
CHANGED
|
@@ -111,7 +111,7 @@ def load_data(result_path) -> pd.DataFrame:
|
|
| 111 |
return data
|
| 112 |
|
| 113 |
|
| 114 |
-
def
|
| 115 |
result_path = get_result_path_from_model(model_id, latest_result_path_per_model)
|
| 116 |
data = load_data(result_path)
|
| 117 |
model_name = data.get("model_name", "Model")
|
|
@@ -204,15 +204,15 @@ latest_result_path_per_model = filter_latest_result_path_per_model(fetch_result_
|
|
| 204 |
|
| 205 |
with gr.Blocks(fill_height=True) as demo:
|
| 206 |
gr.HTML("<h1 style='text-align: center;'>Compare Results of the 🤗 Open LLM Leaderboard</h1>")
|
| 207 |
-
gr.HTML("<h3 style='text-align: center;'>Select 2
|
| 208 |
|
| 209 |
with gr.Row():
|
| 210 |
with gr.Column():
|
| 211 |
-
model_id_1 = gr.Dropdown(choices=list(latest_result_path_per_model.keys()), label="
|
| 212 |
load_btn_1 = gr.Button("Load")
|
| 213 |
dataframe_1 = gr.Dataframe(visible=False)
|
| 214 |
with gr.Column():
|
| 215 |
-
model_id_2 = gr.Dropdown(choices=list(latest_result_path_per_model.keys()), label="
|
| 216 |
load_btn_2 = gr.Button("Load")
|
| 217 |
dataframe_2 = gr.Dataframe(visible=False)
|
| 218 |
with gr.Row():
|
|
@@ -245,7 +245,7 @@ with gr.Blocks(fill_height=True) as demo:
|
|
| 245 |
details_dataframe = gr.DataFrame(visible=False)
|
| 246 |
|
| 247 |
load_btn_1.click(
|
| 248 |
-
fn=
|
| 249 |
inputs=model_id_1,
|
| 250 |
outputs=dataframe_1,
|
| 251 |
).then(
|
|
@@ -258,7 +258,7 @@ with gr.Blocks(fill_height=True) as demo:
|
|
| 258 |
outputs=task,
|
| 259 |
)
|
| 260 |
load_btn_2.click(
|
| 261 |
-
fn=
|
| 262 |
inputs=model_id_2,
|
| 263 |
outputs=dataframe_2,
|
| 264 |
).then(
|
|
|
|
| 111 |
return data
|
| 112 |
|
| 113 |
|
| 114 |
+
def load_results_dataframe(model_id):
|
| 115 |
result_path = get_result_path_from_model(model_id, latest_result_path_per_model)
|
| 116 |
data = load_data(result_path)
|
| 117 |
model_name = data.get("model_name", "Model")
|
|
|
|
| 204 |
|
| 205 |
with gr.Blocks(fill_height=True) as demo:
|
| 206 |
gr.HTML("<h1 style='text-align: center;'>Compare Results of the 🤗 Open LLM Leaderboard</h1>")
|
| 207 |
+
gr.HTML("<h3 style='text-align: center;'>Select 2 models to load and compare their results</h3>")
|
| 208 |
|
| 209 |
with gr.Row():
|
| 210 |
with gr.Column():
|
| 211 |
+
model_id_1 = gr.Dropdown(choices=list(latest_result_path_per_model.keys()), label="Models")
|
| 212 |
load_btn_1 = gr.Button("Load")
|
| 213 |
dataframe_1 = gr.Dataframe(visible=False)
|
| 214 |
with gr.Column():
|
| 215 |
+
model_id_2 = gr.Dropdown(choices=list(latest_result_path_per_model.keys()), label="Models")
|
| 216 |
load_btn_2 = gr.Button("Load")
|
| 217 |
dataframe_2 = gr.Dataframe(visible=False)
|
| 218 |
with gr.Row():
|
|
|
|
| 245 |
details_dataframe = gr.DataFrame(visible=False)
|
| 246 |
|
| 247 |
load_btn_1.click(
|
| 248 |
+
fn=load_results_dataframe,
|
| 249 |
inputs=model_id_1,
|
| 250 |
outputs=dataframe_1,
|
| 251 |
).then(
|
|
|
|
| 258 |
outputs=task,
|
| 259 |
)
|
| 260 |
load_btn_2.click(
|
| 261 |
+
fn=load_results_dataframe,
|
| 262 |
inputs=model_id_2,
|
| 263 |
outputs=dataframe_2,
|
| 264 |
).then(
|