Spaces:
Runtime error
Runtime error
Early exits for steps
Browse files
app.py
CHANGED
@@ -79,6 +79,7 @@ def main():
|
|
79 |
metadata = try_parse_yaml(meta_yaml)
|
80 |
if metadata is None:
|
81 |
st.stop()
|
|
|
82 |
else:
|
83 |
st.success("Successfully loaded the metadata!")
|
84 |
with st.expander("Inspect the parsed metadata for debugging"):
|
@@ -109,6 +110,9 @@ def main():
|
|
109 |
label="", text="add more if needed, and press enter", value=metadata["language"],
|
110 |
key=model_id+"_langs"
|
111 |
)
|
|
|
|
|
|
|
112 |
lang_names = [lang2name[lang] if lang in lang2name else lang for lang in languages]
|
113 |
st.markdown("These languages will be parsed by the leaderboard as: ")
|
114 |
st.code(", ".join(lang_names))
|
@@ -133,6 +137,9 @@ def main():
|
|
133 |
label="", text="add more if needed, and press enter", value=metadata["datasets"],
|
134 |
key=model_id+"_train_dataset"
|
135 |
)
|
|
|
|
|
|
|
136 |
if "common_voice" in train_datasets:
|
137 |
st.warning(
|
138 |
"WARNING: `common_voice` is deprecated, please replace it with its equivalent: "
|
@@ -152,6 +159,9 @@ def main():
|
|
152 |
if "name" not in ["model-index"][0]:
|
153 |
metadata["model-index"][0]["name"] = model_id.split("/")[-1]
|
154 |
model_name = st.text_input("", value=metadata["model-index"][0]["name"])
|
|
|
|
|
|
|
155 |
metadata["model-index"][0]["name"] = model_name
|
156 |
|
157 |
############################
|
@@ -196,7 +206,7 @@ def main():
|
|
196 |
)
|
197 |
dataset_name = st.text_input(
|
198 |
label="A pretty name for the dataset. Examples: 'Common Voice 9.0 (French)', 'LibriSpeech (clean)'",
|
199 |
-
placeholder="Common Voice
|
200 |
**dataset_name_kwargs,
|
201 |
)
|
202 |
dataset_config = st.text_input(
|
|
|
79 |
metadata = try_parse_yaml(meta_yaml)
|
80 |
if metadata is None:
|
81 |
st.stop()
|
82 |
+
return
|
83 |
else:
|
84 |
st.success("Successfully loaded the metadata!")
|
85 |
with st.expander("Inspect the parsed metadata for debugging"):
|
|
|
110 |
label="", text="add more if needed, and press enter", value=metadata["language"],
|
111 |
key=model_id+"_langs"
|
112 |
)
|
113 |
+
if not languages:
|
114 |
+
st.stop()
|
115 |
+
return
|
116 |
lang_names = [lang2name[lang] if lang in lang2name else lang for lang in languages]
|
117 |
st.markdown("These languages will be parsed by the leaderboard as: ")
|
118 |
st.code(", ".join(lang_names))
|
|
|
137 |
label="", text="add more if needed, and press enter", value=metadata["datasets"],
|
138 |
key=model_id+"_train_dataset"
|
139 |
)
|
140 |
+
if not train_datasets:
|
141 |
+
st.stop()
|
142 |
+
return
|
143 |
if "common_voice" in train_datasets:
|
144 |
st.warning(
|
145 |
"WARNING: `common_voice` is deprecated, please replace it with its equivalent: "
|
|
|
159 |
if "name" not in ["model-index"][0]:
|
160 |
metadata["model-index"][0]["name"] = model_id.split("/")[-1]
|
161 |
model_name = st.text_input("", value=metadata["model-index"][0]["name"])
|
162 |
+
if not model_name:
|
163 |
+
st.stop()
|
164 |
+
return
|
165 |
metadata["model-index"][0]["name"] = model_name
|
166 |
|
167 |
############################
|
|
|
206 |
)
|
207 |
dataset_name = st.text_input(
|
208 |
label="A pretty name for the dataset. Examples: 'Common Voice 9.0 (French)', 'LibriSpeech (clean)'",
|
209 |
+
placeholder="Common Voice 9.0 (French)",
|
210 |
**dataset_name_kwargs,
|
211 |
)
|
212 |
dataset_config = st.text_input(
|