Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,5 +5,10 @@ import langcodes
|
|
5 |
langtext = st.text_area("language code", "en")
|
6 |
found = langcodes.find(langtext)
|
7 |
display = found.display_name()
|
|
|
|
|
|
|
|
|
|
|
8 |
st.write(f"langcodes found the following tag: {found}")
|
9 |
st.write(f"Display name: {display}")
|
|
|
5 |
langtext = st.text_area("language code", "en")
|
6 |
found = langcodes.find(langtext)
|
7 |
display = found.display_name()
|
8 |
+
|
9 |
+
if tag_is_valid('langtext'):
|
10 |
+
st.write(f"{langtext} is a valid BCP-47 language code")
|
11 |
+
else:
|
12 |
+
st.write(f"{langtext} is not a valid BCP-47 language code")
|
13 |
st.write(f"langcodes found the following tag: {found}")
|
14 |
st.write(f"Display name: {display}")
|