Spaces:
Running
Running
Make the dataset selector more visible
Browse files
app.py
CHANGED
@@ -132,9 +132,6 @@ def generate_dataset_info(datasets):
|
|
132 |
msg += f"* [{dataset_id}](https://hf.co/datasets/{dataset_id}) *(recommended)*\n"
|
133 |
else:
|
134 |
msg += f"* [{dataset_id}](https://hf.co/datasets/{dataset_id})\n"
|
135 |
-
msg += """
|
136 |
-
Choose the dataset that is most relevant to your task and select it from the dropdown below.
|
137 |
-
"""
|
138 |
|
139 |
msg = "\n".join([line.strip() for line in msg.split("\n")])
|
140 |
return msg
|
@@ -162,9 +159,6 @@ lang_df = dataframe[dataframe.lang == lang]
|
|
162 |
|
163 |
sorted_datasets = sort_datasets(lang_df["dataset"].unique())
|
164 |
|
165 |
-
text = generate_dataset_info(sorted_datasets)
|
166 |
-
st.sidebar.markdown(text)
|
167 |
-
|
168 |
lang_name = lang2name[lang] if lang in lang2name else ""
|
169 |
num_models = len(lang_df["model_id"].unique())
|
170 |
num_datasets = len(lang_df["dataset"].unique())
|
@@ -174,6 +168,10 @@ trained on `{num_datasets}` dataset(s) available for `automatic-speech-recogniti
|
|
174 |
"""
|
175 |
st.markdown(text)
|
176 |
|
|
|
|
|
|
|
|
|
177 |
dataset = st.sidebar.selectbox(
|
178 |
"Dataset",
|
179 |
sorted_datasets,
|
@@ -181,6 +179,9 @@ dataset = st.sidebar.selectbox(
|
|
181 |
)
|
182 |
dataset_df = lang_df[lang_df.dataset == dataset]
|
183 |
|
|
|
|
|
|
|
184 |
# sort by WER or CER depending on the language
|
185 |
metric_col = "cer" if lang in cer_langs else "wer"
|
186 |
if dataset_df["config"].nunique() > 1:
|
|
|
132 |
msg += f"* [{dataset_id}](https://hf.co/datasets/{dataset_id}) *(recommended)*\n"
|
133 |
else:
|
134 |
msg += f"* [{dataset_id}](https://hf.co/datasets/{dataset_id})\n"
|
|
|
|
|
|
|
135 |
|
136 |
msg = "\n".join([line.strip() for line in msg.split("\n")])
|
137 |
return msg
|
|
|
159 |
|
160 |
sorted_datasets = sort_datasets(lang_df["dataset"].unique())
|
161 |
|
|
|
|
|
|
|
162 |
lang_name = lang2name[lang] if lang in lang2name else ""
|
163 |
num_models = len(lang_df["model_id"].unique())
|
164 |
num_datasets = len(lang_df["dataset"].unique())
|
|
|
168 |
"""
|
169 |
st.markdown(text)
|
170 |
|
171 |
+
st.sidebar.markdown("""
|
172 |
+
Choose the dataset that is most relevant to your task and select it from the dropdown below:
|
173 |
+
""")
|
174 |
+
|
175 |
dataset = st.sidebar.selectbox(
|
176 |
"Dataset",
|
177 |
sorted_datasets,
|
|
|
179 |
)
|
180 |
dataset_df = lang_df[lang_df.dataset == dataset]
|
181 |
|
182 |
+
text = generate_dataset_info(sorted_datasets)
|
183 |
+
st.sidebar.markdown(text)
|
184 |
+
|
185 |
# sort by WER or CER depending on the language
|
186 |
metric_col = "cer" if lang in cer_langs else "wer"
|
187 |
if dataset_df["config"].nunique() > 1:
|