Spaces:
Running
Running
ardaatahan
commited on
Commit
·
8f6a603
1
Parent(s):
3e6fa1f
stop showing english-only model to models that have multilingual wer
Browse files
main.py
CHANGED
@@ -31,7 +31,6 @@ from constants import (
|
|
31 |
from utils import (
|
32 |
add_datasets_to_performance_columns,
|
33 |
add_datasets_to_quality_columns,
|
34 |
-
calculate_parity,
|
35 |
create_confusion_matrix_plot,
|
36 |
create_initial_performance_column_dict,
|
37 |
create_initial_quality_column_dict,
|
@@ -110,6 +109,16 @@ model_to_multilingual_wer = dict(
|
|
110 |
zip(multilingual_df["Model"], multilingual_df["Average WER"])
|
111 |
)
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
# Add English WER and Multilingual WER to performance_df
|
114 |
benchmark_df["english_wer"] = benchmark_df["model"].map(model_to_english_wer)
|
115 |
benchmark_df["multilingual_wer"] = benchmark_df["model"].map(model_to_multilingual_wer)
|
|
|
31 |
from utils import (
|
32 |
add_datasets_to_performance_columns,
|
33 |
add_datasets_to_quality_columns,
|
|
|
34 |
create_confusion_matrix_plot,
|
35 |
create_initial_performance_column_dict,
|
36 |
create_initial_quality_column_dict,
|
|
|
109 |
zip(multilingual_df["Model"], multilingual_df["Average WER"])
|
110 |
)
|
111 |
|
112 |
+
# Copy over the multilingual WER to matching models
|
113 |
+
multilingual_models = {}
|
114 |
+
for multilingual_model, multilingual_wer in model_to_multilingual_wer.items():
|
115 |
+
for model in benchmark_df["model"].unique().tolist():
|
116 |
+
if multilingual_model in model and not model.endswith("en"):
|
117 |
+
multilingual_models[model] = multilingual_wer
|
118 |
+
|
119 |
+
# Update the dictionary with turbo models
|
120 |
+
model_to_multilingual_wer.update(multilingual_models)
|
121 |
+
|
122 |
# Add English WER and Multilingual WER to performance_df
|
123 |
benchmark_df["english_wer"] = benchmark_df["model"].map(model_to_english_wer)
|
124 |
benchmark_df["multilingual_wer"] = benchmark_df["model"].map(model_to_multilingual_wer)
|