Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,10 @@ LAST_UPDATED = "OCT 2nd 2024"
|
|
11 |
|
12 |
column_names = {
|
13 |
"MODEL": "Model",
|
14 |
-
"WER": "WER ⬇️",
|
15 |
-
"CER": "CER ⬇️",
|
|
|
|
|
16 |
}
|
17 |
|
18 |
# Load evaluation results
|
@@ -105,7 +107,7 @@ def request_model(model_text):
|
|
105 |
)
|
106 |
|
107 |
# Update the results CSV
|
108 |
-
new_row = {'model': model_text, '
|
109 |
df_results = pd.read_csv(csv_results)
|
110 |
df_results = df_results.append(new_row, ignore_index=True)
|
111 |
df_results.to_csv(csv_results, index=False)
|
@@ -119,7 +121,7 @@ def request_model(model_text):
|
|
119 |
else:
|
120 |
original_df[col] = original_df[col].apply(formatter)
|
121 |
original_df.rename(columns=column_names, inplace=True)
|
122 |
-
original_df.sort_values(by='WER ⬇️', inplace=True)
|
123 |
|
124 |
# Update the leaderboard table in the UI
|
125 |
leaderboard_table.update(value=original_df)
|
|
|
11 |
|
12 |
column_names = {
|
13 |
"MODEL": "Model",
|
14 |
+
"WER": "Common Voice WER ⬇️",
|
15 |
+
"CER": "Common Voice CER ⬇️",
|
16 |
+
"WER2": "persian-asr-test-set WER" ,
|
17 |
+
"CER2": "persian-asr-test-set CER"
|
18 |
}
|
19 |
|
20 |
# Load evaluation results
|
|
|
107 |
)
|
108 |
|
109 |
# Update the results CSV
|
110 |
+
new_row = {'model': model_text, 'Common Voice WER ⬇️': wer_result, 'Common Voice CER ⬇️': cer_result}
|
111 |
df_results = pd.read_csv(csv_results)
|
112 |
df_results = df_results.append(new_row, ignore_index=True)
|
113 |
df_results.to_csv(csv_results, index=False)
|
|
|
121 |
else:
|
122 |
original_df[col] = original_df[col].apply(formatter)
|
123 |
original_df.rename(columns=column_names, inplace=True)
|
124 |
+
original_df.sort_values(by='Common Voice WER ⬇️', inplace=True)
|
125 |
|
126 |
# Update the leaderboard table in the UI
|
127 |
leaderboard_table.update(value=original_df)
|