Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def get_valid_epitran_mappings_list():
|
|
41 |
map_path = Path(epitran.__path__[0]) / "data" / "map"
|
42 |
map_files = map_path.glob("*.*")
|
43 |
valid_mappings = [map_file.stem for map_file in map_files]
|
44 |
-
valid_mappings.append("cmn-Hans")
|
45 |
|
46 |
problem_mappings = ['generic-Latn',
|
47 |
'tur-Latn-bab',
|
@@ -75,7 +75,7 @@ if __name__ == "__main__":
|
|
75 |
st.write(f"Selected input language/script: {description}")
|
76 |
|
77 |
|
78 |
-
if selected_mapping
|
79 |
st.info("Chinese requires a special dictionary. Downloading now")
|
80 |
epitran.download.cedict()
|
81 |
|
|
|
41 |
map_path = Path(epitran.__path__[0]) / "data" / "map"
|
42 |
map_files = map_path.glob("*.*")
|
43 |
valid_mappings = [map_file.stem for map_file in map_files]
|
44 |
+
valid_mappings.append("cmn-Hans") # special case
|
45 |
|
46 |
problem_mappings = ['generic-Latn',
|
47 |
'tur-Latn-bab',
|
|
|
75 |
st.write(f"Selected input language/script: {description}")
|
76 |
|
77 |
|
78 |
+
if selected_mapping == "cmn-Hans":
|
79 |
st.info("Chinese requires a special dictionary. Downloading now")
|
80 |
epitran.download.cedict()
|
81 |
|