Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- 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 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
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":
|
|
|
|
|
|
|
|
|
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 = {
|