cdleong commited on
Commit
0fef655
1 Parent(s): f4a8f9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -19,13 +19,13 @@ except langcodes.LanguageTagError as e:
19
 
20
 
21
 
22
-
23
- try:
24
- found = langcodes.find(langtext)
25
- lang = found
26
- except LookupError as e:
27
- st.write(f"Couldn't look up langtext, sorry: {e}")
28
- lang = None
29
 
30
 
31
  #st.write(f"langcodes found the following tag: {type(found)}") # a Language object
 
19
 
20
 
21
 
22
+ if lang is None:
23
+ try:
24
+ found = langcodes.find(langtext)
25
+ lang = found
26
+ except LookupError as e:
27
+ st.write(f"Couldn't look up langtext, sorry: {e}")
28
+ lang = None
29
 
30
 
31
  #st.write(f"langcodes found the following tag: {type(found)}") # a Language object