陈俊杰 commited on
Commit
1fd8f1d
1 Parent(s): 819591b

cjj-leaderboard

Browse files
Files changed (2) hide show
  1. app.py +13 -12
  2. test.py +9 -6
app.py CHANGED
@@ -219,7 +219,7 @@ This leaderboard is used to show the performance of the <strong>automatic evalua
219
  data = {
220
  ('', 'teamId'): ['baseline', 'baseline', 'baseline', 'baseline'],
221
  ('', 'methods'): ["chatglm3-6b", "baichuan2-13b", "chatglm-pro", "gpt-4o-mini"],
222
- ('', 'overall'): [],
223
  ('Dialogue Generation', 'accuracy'): [0.5806, 0.5483, 0.6001, 0.6472],
224
  ('Dialogue Generation', "kendall's tau"): [0.3243, 0.1739, 0.3042, 0.4167],
225
  ('Dialogue Generation', 'spearman'): [0.3505, 0.1857, 0.3264, 0.4512],
@@ -233,17 +233,18 @@ This leaderboard is used to show the performance of the <strong>automatic evalua
233
  ('Non-Factoid QA', "kendall's tau"): [0.2332, 0.2389, 0.4440, 0.4235],
234
  ('Non-Factoid QA', 'spearman'): [0.2443, 0.2492, 0.4630, 0.4511]
235
  }
236
- overall = [0, 0, 0, 0]
237
- for d in data:
238
- if d != ('', 'teamId') and d != ('', 'methods') and d != ('', 'overall'):
239
- for i in range(4):
240
- overall[i] += data[d][i]
241
- overall = [i / (3*4) for i in overall]
242
- data[('', 'overall')] = overall
243
- for d in data:
244
- if d != ('', 'teamId') and d != ('', 'methods'):
245
- for col in range(len(data[d])):
246
- data[d][col] = "{:.4f}".format(data[d][col])
 
247
  st.dataframe(data, use_container_width=True)
248
  # # teamId 唯一标识码
249
  # DG = {
 
219
  data = {
220
  ('', 'teamId'): ['baseline', 'baseline', 'baseline', 'baseline'],
221
  ('', 'methods'): ["chatglm3-6b", "baichuan2-13b", "chatglm-pro", "gpt-4o-mini"],
222
+ ('', 'overall'): [0,0,0,0],
223
  ('Dialogue Generation', 'accuracy'): [0.5806, 0.5483, 0.6001, 0.6472],
224
  ('Dialogue Generation', "kendall's tau"): [0.3243, 0.1739, 0.3042, 0.4167],
225
  ('Dialogue Generation', 'spearman'): [0.3505, 0.1857, 0.3264, 0.4512],
 
233
  ('Non-Factoid QA', "kendall's tau"): [0.2332, 0.2389, 0.4440, 0.4235],
234
  ('Non-Factoid QA', 'spearman'): [0.2443, 0.2492, 0.4630, 0.4511]
235
  }
236
+ # overall = [0, 0, 0, 0]
237
+ # for d in data:
238
+ # if d != ('', 'teamId') and d != ('', 'methods') and d != ('', 'overall'):
239
+ # for i in range(4):
240
+ # overall[i] += data[d][i]
241
+ # overall = [i / (3*4) for i in overall]
242
+ # data[('', 'overall')] = overall
243
+ # for d in data:
244
+ # if d != ('', 'teamId') and d != ('', 'methods'):
245
+ # for col in range(len(data[d])):
246
+ # data[d][col] = "{:.4f}".format(data[d][col])
247
+ # print(data)
248
  st.dataframe(data, use_container_width=True)
249
  # # teamId 唯一标识码
250
  # DG = {
test.py CHANGED
@@ -1,7 +1,7 @@
1
  data = {
2
  ('', 'teamId'): ['baseline', 'baseline', 'baseline', 'baseline'],
3
  ('', 'methods'): ["chatglm3-6b", "baichuan2-13b", "chatglm-pro", "gpt-4o-mini"],
4
- ('', 'overall'): [],
5
  ('Dialogue Generation', 'accuracy'): [0.5806, 0.5483, 0.6001, 0.6472],
6
  ('Dialogue Generation', "kendall's tau"): [0.3243, 0.1739, 0.3042, 0.4167],
7
  ('Dialogue Generation', 'spearman'): [0.3505, 0.1857, 0.3264, 0.4512],
@@ -17,11 +17,14 @@ data = {
17
  }
18
 
19
  overall = [0, 0, 0, 0]
20
-
21
  for d in data:
22
  if d != ('', 'teamId') and d != ('', 'methods') and d != ('', 'overall'):
23
- for i in range(4):
24
- overall[i] += data[d][i]
25
-
26
  overall = [i / (3*4) for i in overall]
27
- print(overall)
 
 
 
 
 
 
1
  data = {
2
  ('', 'teamId'): ['baseline', 'baseline', 'baseline', 'baseline'],
3
  ('', 'methods'): ["chatglm3-6b", "baichuan2-13b", "chatglm-pro", "gpt-4o-mini"],
4
+ ('', 'overall'): [0,0,0,0],
5
  ('Dialogue Generation', 'accuracy'): [0.5806, 0.5483, 0.6001, 0.6472],
6
  ('Dialogue Generation', "kendall's tau"): [0.3243, 0.1739, 0.3042, 0.4167],
7
  ('Dialogue Generation', 'spearman'): [0.3505, 0.1857, 0.3264, 0.4512],
 
17
  }
18
 
19
  overall = [0, 0, 0, 0]
 
20
  for d in data:
21
  if d != ('', 'teamId') and d != ('', 'methods') and d != ('', 'overall'):
22
+ for i in range(4):
23
+ overall[i] += data[d][i]
 
24
  overall = [i / (3*4) for i in overall]
25
+ data[('', 'overall')] = overall
26
+ for d in data:
27
+ if d != ('', 'teamId') and d != ('', 'methods'):
28
+ for col in range(len(data[d])):
29
+ data[d][col] = "{:.4f}".format(data[d][col])
30
+ print(data)