zhuohan-7 commited on
Commit
8cbeb07
·
verified ·
1 Parent(s): 9d4c863

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app/draw_diagram.py +14 -11
app/draw_diagram.py CHANGED
@@ -49,16 +49,15 @@ def draw(folder_name, category_name, dataset_name, metrics):
49
  min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
50
  max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
51
 
52
- columns = list(chart_data.columns)[1:]
53
- series = []
54
- for col in columns:
55
- series.append(
56
- {
57
- "name": f"{col.replace('_', '-')}",
58
- "type": "line",
59
- "data": chart_data[f'{col}'].tolist(),
60
- }
61
- )
62
 
63
 
64
  options = {
@@ -84,7 +83,11 @@ def draw(folder_name, category_name, dataset_name, metrics):
84
  "max": max_value,
85
  # "splitNumber": 10
86
  }],
87
- "series": series,
 
 
 
 
88
  }
89
 
90
  events = {
 
49
  min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
50
  max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
51
 
52
+ # columns = list(chart_data.columns)[1:]
53
+ # for col in columns:
54
+ # series.append(
55
+ # {
56
+ # "name": f"{col.replace('_', '-')}",
57
+ # "type": "line",
58
+ # "data": chart_data[f'{col}'].tolist(),
59
+ # }
60
+ # )
 
61
 
62
 
63
  options = {
 
83
  "max": max_value,
84
  # "splitNumber": 10
85
  }],
86
+ "series": [{
87
+ "name": f"{dataset_name.replace('_', '-')}",
88
+ "type": "line",
89
+ "data": chart_data[f'{dataset_name}'].tolist(),
90
+ }],
91
  }
92
 
93
  events = {