davidpomerenke commited on
Commit
760c6c6
Β·
verified Β·
1 Parent(s): b5966e7

Upload from GitHub Actions: Merge remote changes with local frontend updates

Browse files
frontend/src/App.js CHANGED
@@ -19,6 +19,8 @@ function App () {
19
  const [error, setError] = useState(null)
20
  const [selectedLanguages, setSelectedLanguages] = useState([])
21
  const [dialogVisible, setDialogVisible] = useState(false)
 
 
22
 
23
  useEffect(() => {
24
  fetch('/api/data', {
@@ -54,9 +56,22 @@ function App () {
54
 
55
  return (
56
  <PrimeReactProvider>
57
- <div style={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
58
  <div style={{backgroundColor: '#fff3cd', color: '#856404', padding: '0.75rem 1.25rem', marginBottom: '1rem', border: '1px solid #ffeeba', borderRadius: '0.25rem', textAlign: 'center'}}>
59
  <strong>Work in Progress:</strong> This dashboard is currently under active development. Evaluation results are not yet final.
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  </div>
61
  <header
62
  style={{
@@ -64,14 +79,17 @@ function App () {
64
  flexDirection: 'column',
65
  alignItems: 'center',
66
  justifyContent: 'center',
67
- padding: '5vh 0'
 
 
 
68
  }}
69
  >
70
  <div>
71
  <span
72
  role='img'
73
  aria-label='Globe Emoji'
74
- style={{ fontSize: '70px' }}
75
  >
76
  🌍
77
  </span>
@@ -79,85 +97,79 @@ function App () {
79
  <h1 style={{ fontSize: '2.5rem', fontWeight: '700' }}>
80
  AI Language Proficiency Monitor
81
  </h1>
82
- <p style={{ fontSize: '1.15rem', color: '#555', marginTop: '0' }}>
83
- Tracking language proficiency of AI models for every language
84
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  {data && (
86
  <AutoComplete
87
  languages={data?.language_table}
88
  onComplete={items => setSelectedLanguages(items)}
89
  />
90
  )}
91
- <div style={{maxWidth: '600px', textAlign: 'center', marginTop: '2rem'}}>
92
- <p>The <i>AI Language Proficiency Monitor</i> presents comprehensive multilingual evaluation results of AI language models.</p>
93
- <ul style={{textAlign: 'left'}}>
94
- <li><b>Practitioners</b> can pick the best model for a given language.</li>
95
- <li><b>Policymakers and funders</b> can identify and prioritize neglected languages.</li>
96
- <li><b>Model developers</b> can compete on our <i>AI Language Proficiency</i> metric.</li>
97
- </ul>
98
- <p>We invite the community to <a href="https://forms.gle/ckvY9pS7XLcHYnaV8" target="_blank" rel="noopener noreferrer">submit</a> their custom finetuned models, and to <a href="https://github.com/datenlabor-bmz/ai-language-monitor/blob/main/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer">integrate</a> benchmarks for more languages and tasks.</p>
99
- <p>Benchmark results automatically refresh every night and include the most popular models on <a href="https://openrouter.ai" target="_blank" rel="noopener noreferrer">OpenRouter</a>, plus community-listed models.</p>
100
- {/* <p>For a detailed methodlogy, see <a href="#">XXX</a>.</p> */}
101
- <p>The AI Language Proficiency Monitor is a collaboration between BMZ's <a href="https://www.bmz-digital.global/en/overview-of-initiatives/the-bmz-data-lab/" target="_blank" rel="noopener noreferrer">Data Lab</a>, the BMZ-Initiative <a href="https://www.bmz-digital.global/en/overview-of-initiatives/fair-forward/" target="_blank" rel="noopener noreferrer">Fair Forward</a> (implemented by GIZ), and the <a href="https://www.dfki.de/en/web/research/research-departments/multilinguality-and-language-technology/ee-team" target="_blank" rel="noopener noreferrer">E&E group</a> of DFKI's Multilinguality and Language Technology Lab.</p>
102
- </div>
103
- <a href="https://github.com/datenlabor-bmz/ai-language-monitor" target="_blank" rel="noopener noreferrer" style={{ textDecoration: 'none', color: 'inherit', marginTop: '2rem' }}>
104
- <i className="pi pi-github" style={{ fontSize: '1.5rem' }} />
105
- </a>
106
  </header>
107
  <main
108
  style={{
109
  display: 'flex',
110
- flexDirection: 'row',
111
- flexWrap: 'wrap',
112
- gap: '2rem',
113
- alignItems: 'center',
114
  width: '100%',
115
- height: '100%',
116
- justifyContent: 'center',
117
- paddingBottom: '5vh'
118
  }}
119
  >
120
  {loading && (
121
- <i className='pi pi-spinner pi-spin' style={{ fontSize: '4rem' }} />
 
 
122
  )}
123
- {error && <p>Error: {error}</p>}
124
  {data && (
125
  <>
126
- <div
127
- style={{
128
- flex: '60vw 100vw 40vw',
129
- maxWidth: 'min(100vw, 800px)'
130
- }}
131
- >
132
  <ModelTable data={data.model_table} />
133
  </div>
134
- <div
135
- style={{
136
- flex: '60vw 100vw 40vw',
137
- maxWidth: 'min(100vw, 800px)'
138
- }}
139
- >
140
  <LanguageTable
141
  data={data.language_table}
142
  selectedLanguages={selectedLanguages}
143
  setSelectedLanguages={setSelectedLanguages}
144
  />
145
  </div>
146
- <div
147
- style={{
148
- flex: '60vw 100vw 40vw',
149
- maxWidth: 'min(100vw, 800px)'
150
- }}
151
- >
152
  <DatasetTable data={data} />
153
  </div>
154
  <div
155
  id='figure'
156
  style={{
157
- flex: '100vw 100vw 100vw',
158
- maxWidth: 'min(100vw, 800px)',
159
- alignItems: 'center',
160
- justifyContent: 'center',
161
  width: '100%',
162
  position: 'relative'
163
  }}
@@ -193,13 +205,74 @@ function App () {
193
  )}
194
  </main>
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  <Dialog
197
  visible={dialogVisible}
198
  onHide={() => setDialogVisible(false)}
199
  style={{ width: '90vw', height: '90vh' }}
200
  maximizable
201
  modal
202
- header="Charts"
203
  >
204
  {data && (
205
  <div style={{ width: '100%', height: '100%' }}>
 
19
  const [error, setError] = useState(null)
20
  const [selectedLanguages, setSelectedLanguages] = useState([])
21
  const [dialogVisible, setDialogVisible] = useState(false)
22
+ const [aboutVisible, setAboutVisible] = useState(false)
23
+ const [contributeVisible, setContributeVisible] = useState(false)
24
 
25
  useEffect(() => {
26
  fetch('/api/data', {
 
56
 
57
  return (
58
  <PrimeReactProvider>
59
+ <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column', width: '100vw' }}>
60
  <div style={{backgroundColor: '#fff3cd', color: '#856404', padding: '0.75rem 1.25rem', marginBottom: '1rem', border: '1px solid #ffeeba', borderRadius: '0.25rem', textAlign: 'center'}}>
61
  <strong>Work in Progress:</strong> This dashboard is currently under active development. Evaluation results are not yet final.
62
+ <a href="https://github.com/datenlabor-bmz/ai-language-monitor" target="_blank" rel="noopener noreferrer" style={{
63
+ textDecoration: 'none',
64
+ color: '#856404',
65
+ float: 'right',
66
+ fontSize: '1.2rem',
67
+ fontWeight: 'bold',
68
+ padding: '0 0.5rem',
69
+ borderRadius: '3px',
70
+ backgroundColor: 'rgba(255,255,255,0.3)'
71
+ }}>
72
+ <i className="pi pi-github" title="View on GitHub" style={{ marginRight: '0.3rem' }} />
73
+ GitHub
74
+ </a>
75
  </div>
76
  <header
77
  style={{
 
79
  flexDirection: 'column',
80
  alignItems: 'center',
81
  justifyContent: 'center',
82
+ padding: '5vh 5vw',
83
+ width: '100%',
84
+ maxWidth: '1400px',
85
+ margin: '0 auto'
86
  }}
87
  >
88
  <div>
89
  <span
90
  role='img'
91
  aria-label='Globe Emoji'
92
+ style={{ fontSize: '40px' }}
93
  >
94
  🌍
95
  </span>
 
97
  <h1 style={{ fontSize: '2.5rem', fontWeight: '700' }}>
98
  AI Language Proficiency Monitor
99
  </h1>
100
+ <p style={{ fontSize: '1.10rem', color: '#555', marginTop: '0', marginBottom: '2rem' }}>
101
+ Comprehensive multilingual evaluation results for AI language models
102
  </p>
103
+
104
+ <div style={{ display: 'flex', gap: '1rem', marginBottom: '1.5rem', flexWrap: 'wrap', justifyContent: 'center' }}>
105
+ <Button
106
+ label="πŸ“š About this tool"
107
+ className="p-button-text"
108
+ onClick={() => setAboutVisible(true)}
109
+ style={{
110
+ color: '#666',
111
+ border: '1px solid #ddd',
112
+ padding: '0.5rem 1rem',
113
+ borderRadius: '4px',
114
+ fontSize: '0.9rem'
115
+ }}
116
+ />
117
+
118
+ <Button
119
+ label="πŸš€ Add your model"
120
+ className="p-button-text"
121
+ onClick={() => setContributeVisible(true)}
122
+ style={{
123
+ color: '#666',
124
+ border: '1px solid #ddd',
125
+ padding: '0.5rem 1rem',
126
+ borderRadius: '4px',
127
+ fontSize: '0.9rem'
128
+ }}
129
+ />
130
+ </div>
131
+
132
  {data && (
133
  <AutoComplete
134
  languages={data?.language_table}
135
  onComplete={items => setSelectedLanguages(items)}
136
  />
137
  )}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  </header>
139
  <main
140
  style={{
141
  display: 'flex',
142
+ flexDirection: 'column',
143
+ gap: '3rem',
 
 
144
  width: '100%',
145
+ paddingBottom: '5vh',
146
+ padding: '1rem 15vw 5vh 15vw'
 
147
  }}
148
  >
149
  {loading && (
150
+ <div style={{ width: '100%', textAlign: 'center' }}>
151
+ <i className='pi pi-spinner pi-spin' style={{ fontSize: '4rem' }} />
152
+ </div>
153
  )}
154
+ {error && <div style={{ width: '100%', textAlign: 'center' }}><p>Error: {error}</p></div>}
155
  {data && (
156
  <>
157
+ <div style={{ width: '100%' }}>
 
 
 
 
 
158
  <ModelTable data={data.model_table} />
159
  </div>
160
+ <div style={{ width: '100%' }}>
 
 
 
 
 
161
  <LanguageTable
162
  data={data.language_table}
163
  selectedLanguages={selectedLanguages}
164
  setSelectedLanguages={setSelectedLanguages}
165
  />
166
  </div>
167
+ <div style={{ width: '100%' }}>
 
 
 
 
 
168
  <DatasetTable data={data} />
169
  </div>
170
  <div
171
  id='figure'
172
  style={{
 
 
 
 
173
  width: '100%',
174
  position: 'relative'
175
  }}
 
205
  )}
206
  </main>
207
 
208
+ {/* About Dialog */}
209
+ <Dialog
210
+ visible={aboutVisible}
211
+ onHide={() => setAboutVisible(false)}
212
+ style={{ width: '600px' }}
213
+ modal
214
+ header="About this tool"
215
+ >
216
+ <div>
217
+ <p>The <i>AI Language Proficiency Monitor</i> presents comprehensive multilingual evaluation results of AI language models.</p>
218
+ <h4>Who is this for?</h4>
219
+ <ul>
220
+ <li><b>Practitioners</b> can pick the best model for a given language.</li>
221
+ <li><b>Policymakers and funders</b> can identify and prioritize neglected languages.</li>
222
+ <li><b>Model developers</b> can compete on our <i>AI Language Proficiency</i> metric.</li>
223
+ </ul>
224
+ <h4>⚑ Live Updates</h4>
225
+ <p>Benchmark results automatically refresh every night and include the most popular models from <a href="https://openrouter.ai" target="_blank" rel="noopener noreferrer">OpenRouter</a>, plus community-submitted models.</p>
226
+ <h4>Authors</h4>
227
+ <p>The AI Language Proficiency Monitor is a collaboration between BMZ's <a href="https://www.bmz-digital.global/en/overview-of-initiatives/the-bmz-data-lab/" target="_blank" rel="noopener noreferrer">Data Lab</a>, the BMZ-Initiative <a href="https://www.bmz-digital.global/en/overview-of-initiatives/fair-forward/" target="_blank" rel="noopener noreferrer">Fair Forward</a> (implemented by GIZ), and the <a href="https://www.dfki.de/en/web/research/research-departments/multilinguality-and-language-technology/ee-team" target="_blank" rel="noopener noreferrer">E&E group</a> of DFKI's Multilinguality and Language Technology Lab.</p>
228
+ <h4>πŸ”— Links</h4>
229
+ <p>
230
+ <a
231
+ href="https://github.com/datenlabor-bmz/ai-language-monitor"
232
+ target="_blank"
233
+ rel="noopener noreferrer"
234
+ style={{
235
+ color: '#666',
236
+ textDecoration: 'none',
237
+ display: 'inline-flex',
238
+ alignItems: 'center',
239
+ gap: '0.5rem'
240
+ }}
241
+ >
242
+ <i className="pi pi-github" style={{ fontSize: '1.2rem' }} />
243
+ View source code on GitHub
244
+ </a>
245
+ </p>
246
+ </div>
247
+ </Dialog>
248
+
249
+ {/* Contribute Dialog */}
250
+ <Dialog
251
+ visible={contributeVisible}
252
+ onHide={() => setContributeVisible(false)}
253
+ style={{ width: '600px' }}
254
+ modal
255
+ header="Add your model & Contribute"
256
+ >
257
+ <div>
258
+ <h4>πŸš€ Submit Your Model</h4>
259
+ <p>Have a custom fine-tuned model you'd like to see on the leaderboard?</p>
260
+ <p><a href="https://forms.gle/ckvY9pS7XLcHYnaV8" target="_blank" rel="noopener noreferrer" style={{ color: '#28a745', fontWeight: 'bold' }}>β†’ Submit your model here</a></p>
261
+
262
+ <h4>πŸ”§ Contribute to Development</h4>
263
+ <p>Help us expand language coverage and add new evaluation tasks:</p>
264
+ <p><a href="https://github.com/datenlabor-bmz/ai-language-monitor/blob/main/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer" style={{ color: '#007bff', fontWeight: 'bold' }}>β†’ Contribution guidelines</a></p>
265
+ </div>
266
+ </Dialog>
267
+
268
+ {/* Full-screen Dialog for Charts */}
269
  <Dialog
270
  visible={dialogVisible}
271
  onHide={() => setDialogVisible(false)}
272
  style={{ width: '90vw', height: '90vh' }}
273
  maximizable
274
  modal
275
+ header="Interactive Visualizations"
276
  >
277
  {data && (
278
  <div style={{ width: '100%', height: '100%' }}>
frontend/src/components/AutoComplete.js CHANGED
@@ -4,7 +4,8 @@ const AutoComplete = ({ languages, onComplete }) => {
4
  const [autoComplete, setAutoComplete] = useState('')
5
  const [suggestions, setSuggestions] = useState([])
6
 
7
- const exampleCodes = ['de', 'fr', 'ar', 'hi', 'sw', 'fa']
 
8
  const exampleLanguages = exampleCodes.map(code =>
9
  languages?.find(item => item.bcp_47 === code)
10
  )
 
4
  const [autoComplete, setAutoComplete] = useState('')
5
  const [suggestions, setSuggestions] = useState([])
6
 
7
+ const exampleCodes = ['sw','ar', 'hi', 'en']
8
+ // const exampleCodes = ['ar', 'hi', 'sw', 'fa']
9
  const exampleLanguages = exampleCodes.map(code =>
10
  languages?.find(item => item.bcp_47 === code)
11
  )
frontend/src/components/DatasetTable.js CHANGED
@@ -111,7 +111,7 @@ const DatasetTable = ({ data }) => {
111
  scrollable
112
  scrollHeight='600px'
113
  id='dataset-table'
114
- style={{ width: '800px', minHeight: '650px' }}
115
  >
116
  <Column
117
  field='implemented'
 
111
  scrollable
112
  scrollHeight='600px'
113
  id='dataset-table'
114
+ style={{ width: '100%', minHeight: '650px' }}
115
  >
116
  <Column
117
  field='implemented'
frontend/src/components/LanguageTable.js CHANGED
@@ -135,7 +135,7 @@ const LanguageTable = ({ data, selectedLanguages, setSelectedLanguages }) => {
135
  scrollable
136
  scrollHeight='600px'
137
  id='language-table'
138
- style={{ width: '800px', minHeight: '650px' }}
139
  >
140
  <Column selectionMode='multiple' headerStyle={{ width: '3rem' }} />
141
  <Column
 
135
  scrollable
136
  scrollHeight='600px'
137
  id='language-table'
138
+ style={{ width: '100%', minHeight: '650px' }}
139
  >
140
  <Column selectionMode='multiple' headerStyle={{ width: '3rem' }} />
141
  <Column
frontend/src/components/ModelTable.js CHANGED
@@ -161,7 +161,7 @@ const ModelTable = ({ data }) => {
161
  scrollable
162
  scrollHeight='600px'
163
  id='model-table'
164
- style={{ width: '800px', minHeight: '650px' }}
165
  emptyMessage='No models have been evaluated for the selected languages.'
166
  >
167
  <Column field='rank' body={rankBodyTemplate} headerTooltip='Rank' />
 
161
  scrollable
162
  scrollHeight='600px'
163
  id='model-table'
164
+ style={{ width: '100%', minHeight: '650px' }}
165
  emptyMessage='No models have been evaluated for the selected languages.'
166
  >
167
  <Column field='rank' body={rankBodyTemplate} headerTooltip='Rank' />