cdleong commited on
Commit
ad5eaea
·
1 Parent(s): 837728a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ asyncio.set_event_loop(loop)
11
  from requests_html import AsyncHTMLSession
12
  asession = AsyncHTMLSession()
13
 
14
- async def get_r12(langtext):
15
  r = await asession.get(f"https://r12a.github.io/app-subtags/?find={langtext}")
16
  await r.html.arender()
17
  return r
@@ -21,7 +21,7 @@ async def get_r12(langtext):
21
  # https://huggingface.co/blog/streamlit-spaces
22
  langtext = st.text_input("language lookup using https://github.com/rspeer/langcodes, see also https://r12a.github.io/app-subtags/", "english")
23
 
24
- results = asession.run(get_r12(langtext))
25
  st.write(results)
26
 
27
  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.")
 
11
  from requests_html import AsyncHTMLSession
12
  asession = AsyncHTMLSession()
13
 
14
+ async def get_r12():
15
  r = await asession.get(f"https://r12a.github.io/app-subtags/?find={langtext}")
16
  await r.html.arender()
17
  return r
 
21
  # https://huggingface.co/blog/streamlit-spaces
22
  langtext = st.text_input("language lookup using https://github.com/rspeer/langcodes, see also https://r12a.github.io/app-subtags/", "english")
23
 
24
+ results = asession.run(get_r12)
25
  st.write(results)
26
 
27
  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.")