Spaces:
Runtime error
Runtime error
import streamlit as st | |
import langcodes | |
# https://huggingface.co/blog/streamlit-spaces | |
langtext = st.text_area("language code", "en") | |
found = langcodes.find(langtext) | |
display = found.display_name() | |
if tag_is_valid('langtext'): | |
st.write(f"{langtext} is a valid BCP-47 language code") | |
else: | |
st.write(f"{langtext} is not a valid BCP-47 language code") | |
st.write(f"langcodes found the following tag: {found}") | |
st.write(f"Display name: {display}") | |