Update app.py
Browse files
app.py
CHANGED
@@ -83,7 +83,7 @@ for model_name in tqdm(initial_list_of_models):
|
|
83 |
df = df._append(benchmark_data, ignore_index=True)
|
84 |
|
85 |
# Sort the dataframe by the number of tokens
|
86 |
-
df = df.sort_values(by="
|
87 |
|
88 |
# Save the dataframe to a csv file
|
89 |
df.to_json(dataframe_path, lines=True, orient="records", force_ascii=False)
|
@@ -210,9 +210,9 @@ def refresh():
|
|
210 |
global df
|
211 |
df = pd.read_json(dataframe_path, lines=True)
|
212 |
return (
|
213 |
-
gr.
|
214 |
-
gr.
|
215 |
-
gr.
|
216 |
)
|
217 |
|
218 |
leaderboard_description = """The `Total Number of Tokens` in this leaderboard is based on the total number of tokens got from the Arabic section of [rasaif-translations](https://huggingface.co/datasets/MohamedRashad/rasaif-translations) dataset (This dataset was chosen because it represents Arabic Fusha text in a small and concentrated manner).
|
@@ -240,7 +240,7 @@ with gr.Blocks() as demo:
|
|
240 |
barplot = gr.BarPlot(
|
241 |
df,
|
242 |
x="📛 Models",
|
243 |
-
y="
|
244 |
x_title=" ",
|
245 |
y_title=" ",
|
246 |
width=1000,
|
@@ -248,6 +248,7 @@ with gr.Blocks() as demo:
|
|
248 |
tooltip=["📘 Vocab Size", "🪺 Fertility Score"],
|
249 |
vertical=False,
|
250 |
x_label_angle=30,
|
|
|
251 |
)
|
252 |
model_name = gr.Textbox(
|
253 |
label="Model Name from Hugging Face (e.g. Xenova/gpt-4o)"
|
|
|
83 |
df = df._append(benchmark_data, ignore_index=True)
|
84 |
|
85 |
# Sort the dataframe by the number of tokens
|
86 |
+
df = df.sort_values(by="🪺 Fertility Score", ascending=True)
|
87 |
|
88 |
# Save the dataframe to a csv file
|
89 |
df.to_json(dataframe_path, lines=True, orient="records", force_ascii=False)
|
|
|
210 |
global df
|
211 |
df = pd.read_json(dataframe_path, lines=True)
|
212 |
return (
|
213 |
+
gr.update(df),
|
214 |
+
gr.update(df),
|
215 |
+
gr.update(choices=df["📛 Models"].tolist()),
|
216 |
)
|
217 |
|
218 |
leaderboard_description = """The `Total Number of Tokens` in this leaderboard is based on the total number of tokens got from the Arabic section of [rasaif-translations](https://huggingface.co/datasets/MohamedRashad/rasaif-translations) dataset (This dataset was chosen because it represents Arabic Fusha text in a small and concentrated manner).
|
|
|
240 |
barplot = gr.BarPlot(
|
241 |
df,
|
242 |
x="📛 Models",
|
243 |
+
y="🪺 Fertility Score",
|
244 |
x_title=" ",
|
245 |
y_title=" ",
|
246 |
width=1000,
|
|
|
248 |
tooltip=["📘 Vocab Size", "🪺 Fertility Score"],
|
249 |
vertical=False,
|
250 |
x_label_angle=30,
|
251 |
+
label="Models Fertility Score (Lower is better)",
|
252 |
)
|
253 |
model_name = gr.Textbox(
|
254 |
label="Model Name from Hugging Face (e.g. Xenova/gpt-4o)"
|