cdleong commited on
Commit
b33e08e
1 Parent(s): fa8ef68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
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
- selected_mapping = st.selectbox("Which language/script pair would you like to use?", valid_epitran_mappings)
 
 
56
  description = get_lang_description_from_mapping_name(selected_mapping)
57
- st.write(f"You selected {selected_mapping}, AKA {description }")
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 {epi}...")
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)