Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,10 +51,15 @@ def get_valid_epitran_mappings_list():
|
|
51 |
|
52 |
if __name__ == "__main__":
|
53 |
|
|
|
|
|
|
|
54 |
valid_epitran_mappings = get_valid_epitran_mappings_list()
|
55 |
-
|
|
|
|
|
56 |
description = get_lang_description_from_mapping_name(selected_mapping)
|
57 |
-
st.write(f"
|
58 |
|
59 |
|
60 |
# iso_lang_code = st.text_input(
|
@@ -76,7 +81,7 @@ if __name__ == "__main__":
|
|
76 |
st.info("attempting to instantiate epitran transliterator for your language/script")
|
77 |
epi = epitran.Epitran(selected_mapping )
|
78 |
|
79 |
-
st.info(f"transliterating `{input_text}`\n\tusing {
|
80 |
transliteration = epi.transliterate(input_text)
|
81 |
|
82 |
st.success(transliteration)
|
|
|
51 |
|
52 |
if __name__ == "__main__":
|
53 |
|
54 |
+
st.write("# Phonemize your text with epitran!")
|
55 |
+
|
56 |
+
st.write("Epitran supports the following languages/scripts:")
|
57 |
valid_epitran_mappings = get_valid_epitran_mappings_list()
|
58 |
+
st.write(valid_epitran_mappings)
|
59 |
+
|
60 |
+
selected_mapping = st.selectbox("Select input language/script:", valid_epitran_mappings)
|
61 |
description = get_lang_description_from_mapping_name(selected_mapping)
|
62 |
+
st.write(f"Selected input language/script: {description }")
|
63 |
|
64 |
|
65 |
# iso_lang_code = st.text_input(
|
|
|
81 |
st.info("attempting to instantiate epitran transliterator for your language/script")
|
82 |
epi = epitran.Epitran(selected_mapping )
|
83 |
|
84 |
+
st.info(f"transliterating `{input_text}`\n\tusing {selected_mapping}...")
|
85 |
transliteration = epi.transliterate(input_text)
|
86 |
|
87 |
st.success(transliteration)
|