jjbuschhoff commited on
Commit
c563337
โ€ข
1 Parent(s): e54d30a

Added flags to language checkboxes

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. style.py +26 -0
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
 
3
  import core as core
4
- from style import CSS, T_SYMBOLS, TITLE
5
 
6
  demo = gr.Blocks(css=CSS)
7
  with demo:
@@ -38,7 +38,7 @@ with demo:
38
  )
39
  with gr.Row():
40
  langs_bar = gr.CheckboxGroup(
41
- choices=core.languages_list,
42
  value=core.languages_list,
43
  label="Select languages to average over",
44
  elem_id="column-select",
@@ -58,7 +58,7 @@ with demo:
58
 
59
  def update_bar():
60
  langs_bar = gr.CheckboxGroup(
61
- choices=core.languages_list,
62
  value=core.languages_list,
63
  label="Select languages to average over",
64
  elem_id="column-select",
 
1
  import gradio as gr
2
 
3
  import core as core
4
+ from style import CSS, T_SYMBOLS, TITLE, LANG_SYMBOLS
5
 
6
  demo = gr.Blocks(css=CSS)
7
  with demo:
 
38
  )
39
  with gr.Row():
40
  langs_bar = gr.CheckboxGroup(
41
+ choices=[(LANG_SYMBOLS.get(l,l),l) for l in core.languages_list],
42
  value=core.languages_list,
43
  label="Select languages to average over",
44
  elem_id="column-select",
 
58
 
59
  def update_bar():
60
  langs_bar = gr.CheckboxGroup(
61
+ choices=[(LANG_SYMBOLS.get(l,l),l) for l in core.languages_list],
62
  value=core.languages_list,
63
  label="Select languages to average over",
64
  elem_id="column-select",
style.py CHANGED
@@ -10,7 +10,33 @@ CSS = """
10
  display: none !important;
11
  }
12
  """
 
13
  T_SYMBOLS = {
14
  "pretrained": "๐ŸŸข",
15
  "chat": "๐Ÿ’ฌ"
16
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  display: none !important;
11
  }
12
  """
13
+
14
  T_SYMBOLS = {
15
  "pretrained": "๐ŸŸข",
16
  "chat": "๐Ÿ’ฌ"
17
  }
18
+
19
+ LANG_SYMBOLS = {
20
+ "BG": "๐Ÿ‡ง๐Ÿ‡ฌ BG",
21
+ "CS": "๐Ÿ‡จ๐Ÿ‡ฟ CZ",
22
+ "DA": "๐Ÿ‡ฉ๐Ÿ‡ฐ DK",
23
+ "EL": "๐Ÿ‡ฌ๐Ÿ‡ท EL",
24
+ "ET": "๐Ÿ‡ช๐Ÿ‡ช ET",
25
+ "ES": "๐Ÿ‡ช๐Ÿ‡ธ ES",
26
+ "EN": "๐Ÿ‡ฌ๐Ÿ‡ง EN",
27
+ "FI": "๐Ÿ‡ซ๐Ÿ‡ฎ FI",
28
+ "DE": "๐Ÿ‡ฉ๐Ÿ‡ช DE",
29
+ "FR": "๐Ÿ‡ซ๐Ÿ‡ท FR",
30
+ "HU": "๐Ÿ‡ญ๐Ÿ‡บ HU",
31
+ "IT": "๐Ÿ‡ฎ๐Ÿ‡น IT",
32
+ "LT": "๐Ÿ‡ฑ๐Ÿ‡น LT",
33
+ "LV": "๐Ÿ‡ฑ๐Ÿ‡ป LV",
34
+ "NL": "๐Ÿ‡ณ๐Ÿ‡ฑ NL",
35
+ "PL": "๐Ÿ‡ต๐Ÿ‡ฑ PL",
36
+ "PT-PT": "๐Ÿ‡ต๐Ÿ‡น PT",
37
+ "RO": "๐Ÿ‡ท๐Ÿ‡ด RO",
38
+ "SK": "๐Ÿ‡ธ๐Ÿ‡ฐ SK",
39
+ "SL": "๐Ÿ‡ธ๐Ÿ‡ฎ SL",
40
+ "SV": "๐Ÿ‡ธ๐Ÿ‡ช SV"
41
+ }
42
+