Spaces:
Runtime error
Runtime error
Fix tags widget key
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def main():
|
|
61 |
except requests.exceptions.HTTPError:
|
62 |
st.error(
|
63 |
f"ERROR: https://huggingface.co/{model_id}/blob/main/README.md "
|
64 |
-
f"not found, make sure you've entered a correct model path!"
|
65 |
)
|
66 |
st.stop()
|
67 |
|
@@ -106,7 +106,8 @@ def main():
|
|
106 |
)
|
107 |
|
108 |
languages = st_tags(
|
109 |
-
label="", text="add more if needed, and press enter", value=metadata["language"]
|
|
|
110 |
)
|
111 |
lang_names = [lang2name[lang] if lang in lang2name else lang for lang in languages]
|
112 |
st.markdown("These languages will be parsed by the leaderboard as: ")
|
@@ -129,7 +130,8 @@ def main():
|
|
129 |
metadata["datasets"] = []
|
130 |
|
131 |
train_datasets = st_tags(
|
132 |
-
label="", text="add more if needed, and press enter", value=metadata["datasets"]
|
|
|
133 |
)
|
134 |
if "common_voice" in train_datasets:
|
135 |
st.warning(
|
@@ -142,7 +144,7 @@ def main():
|
|
142 |
# MODEL NAME
|
143 |
############################
|
144 |
st.markdown("### Model name")
|
145 |
-
st.markdown("Enter a
|
146 |
st.markdown("*Example*: `XLS-R Wav2Vec2 LM Spanish by Jane Doe`")
|
147 |
|
148 |
if "model-index" not in metadata:
|
@@ -201,10 +203,11 @@ def main():
|
|
201 |
label="Dataset configuration. Examples: clean, other, en, pt-BR",
|
202 |
placeholder="en",
|
203 |
)
|
|
|
204 |
dataset_language = st.text_input(
|
205 |
label="Dataset language. Examples: en, pt-BR",
|
206 |
-
value=languages[0],
|
207 |
placeholder="en",
|
|
|
208 |
)
|
209 |
dataset_split = st.text_input(
|
210 |
label="Dataset split. Examples: test, validation",
|
|
|
61 |
except requests.exceptions.HTTPError:
|
62 |
st.error(
|
63 |
f"ERROR: https://huggingface.co/{model_id}/blob/main/README.md "
|
64 |
+
f"not found, make sure you've entered a correct model path and created a model card for it!"
|
65 |
)
|
66 |
st.stop()
|
67 |
|
|
|
106 |
)
|
107 |
|
108 |
languages = st_tags(
|
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: ")
|
|
|
130 |
metadata["datasets"] = []
|
131 |
|
132 |
train_datasets = st_tags(
|
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(
|
|
|
144 |
# MODEL NAME
|
145 |
############################
|
146 |
st.markdown("### Model name")
|
147 |
+
st.markdown("Enter a pretty name for your model.")
|
148 |
st.markdown("*Example*: `XLS-R Wav2Vec2 LM Spanish by Jane Doe`")
|
149 |
|
150 |
if "model-index" not in metadata:
|
|
|
203 |
label="Dataset configuration. Examples: clean, other, en, pt-BR",
|
204 |
placeholder="en",
|
205 |
)
|
206 |
+
dataset_language_kwargs = {"value": languages[0]} if len(languages) > 0 else {}
|
207 |
dataset_language = st.text_input(
|
208 |
label="Dataset language. Examples: en, pt-BR",
|
|
|
209 |
placeholder="en",
|
210 |
+
**dataset_language_kwargs
|
211 |
)
|
212 |
dataset_split = st.text_input(
|
213 |
label="Dataset split. Examples: test, validation",
|