Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import langcodes
|
| 3 |
|
|
|
|
|
|
|
| 4 |
# https://huggingface.co/blog/streamlit-spaces
|
| 5 |
# https://github.com/psf/requests-html
|
|
|
|
| 6 |
langtext = st.text_input("language lookup using https://github.com/rspeer/langcodes, see also https://r12a.github.io/app-subtags/", "english")
|
| 7 |
|
| 8 |
st.write("Checking whether the tag is valid. That is, the language, script, territory, and variants (if present) are all tags that have meanings assigned by IANA.")
|
|
@@ -84,5 +87,5 @@ if lang is not None:
|
|
| 84 |
st.write(broader_tags)
|
| 85 |
st.write(f"Try also: https://r12a.github.io/app-subtags/?lookup={lang}")
|
| 86 |
st.write(f"https://glottolog.org/glottolog?search={t_variant} may be of interest, with links to Ethnologue, etc. If that doesn't work, try https://glottolog.org/glottolog?search={b_variant}")
|
| 87 |
-
st.write(f"Correct, standardized, BCP-47 tag for {langtext}, according to the langcodes library: {langcodes.standardize_tag(lang)}")
|
| 88 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import langcodes
|
| 3 |
|
| 4 |
+
st.write("# Language code/tag search")
|
| 5 |
+
st.write("Fed up with language tag confusion? Here's your one-stop shop!")
|
| 6 |
# https://huggingface.co/blog/streamlit-spaces
|
| 7 |
# https://github.com/psf/requests-html
|
| 8 |
+
# https://docs.streamlit.io/library/api-reference/write-magic/st.write
|
| 9 |
langtext = st.text_input("language lookup using https://github.com/rspeer/langcodes, see also https://r12a.github.io/app-subtags/", "english")
|
| 10 |
|
| 11 |
st.write("Checking whether the tag is valid. That is, the language, script, territory, and variants (if present) are all tags that have meanings assigned by IANA.")
|
|
|
|
| 87 |
st.write(broader_tags)
|
| 88 |
st.write(f"Try also: https://r12a.github.io/app-subtags/?lookup={lang}")
|
| 89 |
st.write(f"https://glottolog.org/glottolog?search={t_variant} may be of interest, with links to Ethnologue, etc. If that doesn't work, try https://glottolog.org/glottolog?search={b_variant}")
|
| 90 |
+
st.write(f"## Correct, standardized, BCP-47 tag for {langtext}, according to the langcodes library: {langcodes.standardize_tag(lang)}")
|
| 91 |
|