Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
gradient working
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import subprocess
|
2 |
import gradio as gr
|
|
|
3 |
import pandas as pd
|
4 |
from apscheduler.schedulers.background import BackgroundScheduler
|
5 |
from huggingface_hub import snapshot_download
|
@@ -77,13 +78,14 @@ def update_table(
|
|
77 |
show_deleted: bool,
|
78 |
query: str,
|
79 |
):
|
80 |
-
|
81 |
filtered_df = filter_models(hidden_df, type_query, size_query, nshot_query, precision_query, show_deleted)
|
82 |
-
|
83 |
filtered_df = filter_queries(query, filtered_df)
|
84 |
-
|
85 |
df = select_columns(filtered_df, columns)
|
86 |
-
|
|
|
87 |
|
88 |
leaderboard_df_styled = df.style.background_gradient(cmap="viridis")
|
89 |
# leaderboard_df_styled = leaderboard_df_styled.format("{:.2f}")
|
@@ -226,6 +228,7 @@ with demo:
|
|
226 |
]
|
227 |
leaderboard_df_styled = leaderboard_table_value.style.background_gradient(cmap="viridis")
|
228 |
# leaderboard_df_styled = leaderboard_df_styled.format("{:.2f}")
|
|
|
229 |
|
230 |
leaderboard_table = gr.components.Dataframe(
|
231 |
value=leaderboard_df_styled,
|
|
|
1 |
import subprocess
|
2 |
import gradio as gr
|
3 |
+
import numpy as np
|
4 |
import pandas as pd
|
5 |
from apscheduler.schedulers.background import BackgroundScheduler
|
6 |
from huggingface_hub import snapshot_download
|
|
|
78 |
show_deleted: bool,
|
79 |
query: str,
|
80 |
):
|
81 |
+
|
82 |
filtered_df = filter_models(hidden_df, type_query, size_query, nshot_query, precision_query, show_deleted)
|
83 |
+
|
84 |
filtered_df = filter_queries(query, filtered_df)
|
85 |
+
|
86 |
df = select_columns(filtered_df, columns)
|
87 |
+
|
88 |
+
df = df.replace({'': np.nan})
|
89 |
|
90 |
leaderboard_df_styled = df.style.background_gradient(cmap="viridis")
|
91 |
# leaderboard_df_styled = leaderboard_df_styled.format("{:.2f}")
|
|
|
228 |
]
|
229 |
leaderboard_df_styled = leaderboard_table_value.style.background_gradient(cmap="viridis")
|
230 |
# leaderboard_df_styled = leaderboard_df_styled.format("{:.2f}")
|
231 |
+
leaderboard_df_styled.precision = 2
|
232 |
|
233 |
leaderboard_table = gr.components.Dataframe(
|
234 |
value=leaderboard_df_styled,
|