Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- app/draw_diagram.py +24 -24
app/draw_diagram.py
CHANGED
@@ -122,52 +122,52 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
122 |
"series": [
|
123 |
{
|
124 |
"name": "Overall Accuracy",
|
125 |
-
"type": "line"
|
126 |
"data": chart_data['Accuracy'].tolist(),
|
127 |
},
|
128 |
{
|
129 |
"name": "Cross-Lingual Consistency",
|
130 |
-
"type": "
|
131 |
"data": chart_data["Cross-Lingual Consistency"].tolist(),
|
132 |
},
|
133 |
{
|
134 |
"name": "AC3",
|
135 |
-
"type": "
|
136 |
"data": chart_data["AC3"].tolist(),
|
137 |
},
|
138 |
{
|
139 |
"name": "English",
|
140 |
-
"type": "
|
141 |
"data": chart_data["English"].tolist(),
|
142 |
},
|
143 |
{
|
144 |
"name": "Chinese",
|
145 |
-
"type": "
|
146 |
"data": chart_data["Chinese"].tolist(),
|
147 |
},
|
148 |
{
|
149 |
"name": "Spanish",
|
150 |
-
"type": "
|
151 |
"data": chart_data["Spanish"].tolist(),
|
152 |
},
|
153 |
{
|
154 |
"name": "Vietnamese",
|
155 |
-
"type": "
|
156 |
"data": chart_data["Vietnamese"].tolist(),
|
157 |
},
|
158 |
{
|
159 |
"name": "Indonesian",
|
160 |
-
"type": "
|
161 |
"data": chart_data["Indonesian"].tolist(),
|
162 |
},
|
163 |
{
|
164 |
"name": "Malay",
|
165 |
-
"type": "
|
166 |
"data": chart_data["Malay"].tolist(),
|
167 |
},
|
168 |
{
|
169 |
"name": "Filipino",
|
170 |
-
"type": "
|
171 |
"data": chart_data["Filipino"].tolist(),
|
172 |
},
|
173 |
],
|
@@ -219,37 +219,37 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
219 |
"series": [
|
220 |
{
|
221 |
"name": "Overall Accuracy",
|
222 |
-
"type": "
|
223 |
"data": chart_data['Accuracy'].tolist(),
|
224 |
},
|
225 |
{
|
226 |
"name": "Cross-Lingual Consistency",
|
227 |
-
"type": "
|
228 |
"data": chart_data["Cross-Lingual Consistency"].tolist(),
|
229 |
},
|
230 |
{
|
231 |
"name": "AC3",
|
232 |
-
"type": "
|
233 |
"data": chart_data["AC3"].tolist(),
|
234 |
},
|
235 |
{
|
236 |
"name": "English",
|
237 |
-
"type": "
|
238 |
"data": chart_data["English"].tolist(),
|
239 |
},
|
240 |
{
|
241 |
"name": "Chinese",
|
242 |
-
"type": "
|
243 |
"data": chart_data["Chinese"].tolist(),
|
244 |
},
|
245 |
{
|
246 |
"name": "Spanish",
|
247 |
-
"type": "
|
248 |
"data": chart_data["Spanish"].tolist(),
|
249 |
},
|
250 |
{
|
251 |
"name": "Vietnamese",
|
252 |
-
"type": "
|
253 |
"data": chart_data["Vietnamese"].tolist(),
|
254 |
},
|
255 |
],
|
@@ -358,7 +358,7 @@ def draw_only_acc(folder_name, category_one, category_two, sorted):
|
|
358 |
"series": [
|
359 |
{
|
360 |
"name": "Overall Accuracy",
|
361 |
-
"type": "
|
362 |
"data": chart_data['Accuracy'].tolist(),
|
363 |
},
|
364 |
|
@@ -438,7 +438,7 @@ def draw_flores_translation(category_one, category_two, sorted):
|
|
438 |
"series": [
|
439 |
{
|
440 |
"name": "BLEU",
|
441 |
-
"type": "
|
442 |
"data": chart_data['BLEU'].tolist(),
|
443 |
},
|
444 |
|
@@ -518,22 +518,22 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
518 |
"series": [
|
519 |
{
|
520 |
"name": "Average",
|
521 |
-
"type": "
|
522 |
"data": chart_data['Average'].tolist(),
|
523 |
},
|
524 |
{
|
525 |
"name": "ROUGE-1",
|
526 |
-
"type": "
|
527 |
"data": chart_data["ROUGE-1"].tolist(),
|
528 |
},
|
529 |
{
|
530 |
"name": "ROUGE-2",
|
531 |
-
"type": "
|
532 |
"data": chart_data["ROUGE-2"].tolist(),
|
533 |
},
|
534 |
{
|
535 |
"name": "ROUGE-L",
|
536 |
-
"type": "
|
537 |
"data": chart_data["ROUGE-L"].tolist(),
|
538 |
},
|
539 |
|
@@ -567,7 +567,7 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
567 |
"series": [
|
568 |
{
|
569 |
"name": "Accuracy",
|
570 |
-
"type": "
|
571 |
"data": chart_data['Accuracy'].tolist(),
|
572 |
},
|
573 |
|
|
|
122 |
"series": [
|
123 |
{
|
124 |
"name": "Overall Accuracy",
|
125 |
+
"type": "bar", # "line"
|
126 |
"data": chart_data['Accuracy'].tolist(),
|
127 |
},
|
128 |
{
|
129 |
"name": "Cross-Lingual Consistency",
|
130 |
+
"type": "bar",
|
131 |
"data": chart_data["Cross-Lingual Consistency"].tolist(),
|
132 |
},
|
133 |
{
|
134 |
"name": "AC3",
|
135 |
+
"type": "bar",
|
136 |
"data": chart_data["AC3"].tolist(),
|
137 |
},
|
138 |
{
|
139 |
"name": "English",
|
140 |
+
"type": "bar",
|
141 |
"data": chart_data["English"].tolist(),
|
142 |
},
|
143 |
{
|
144 |
"name": "Chinese",
|
145 |
+
"type": "bar",
|
146 |
"data": chart_data["Chinese"].tolist(),
|
147 |
},
|
148 |
{
|
149 |
"name": "Spanish",
|
150 |
+
"type": "bar",
|
151 |
"data": chart_data["Spanish"].tolist(),
|
152 |
},
|
153 |
{
|
154 |
"name": "Vietnamese",
|
155 |
+
"type": "bar",
|
156 |
"data": chart_data["Vietnamese"].tolist(),
|
157 |
},
|
158 |
{
|
159 |
"name": "Indonesian",
|
160 |
+
"type": "bar",
|
161 |
"data": chart_data["Indonesian"].tolist(),
|
162 |
},
|
163 |
{
|
164 |
"name": "Malay",
|
165 |
+
"type": "bar",
|
166 |
"data": chart_data["Malay"].tolist(),
|
167 |
},
|
168 |
{
|
169 |
"name": "Filipino",
|
170 |
+
"type": "bar",
|
171 |
"data": chart_data["Filipino"].tolist(),
|
172 |
},
|
173 |
],
|
|
|
219 |
"series": [
|
220 |
{
|
221 |
"name": "Overall Accuracy",
|
222 |
+
"type": "bar",
|
223 |
"data": chart_data['Accuracy'].tolist(),
|
224 |
},
|
225 |
{
|
226 |
"name": "Cross-Lingual Consistency",
|
227 |
+
"type": "bar",
|
228 |
"data": chart_data["Cross-Lingual Consistency"].tolist(),
|
229 |
},
|
230 |
{
|
231 |
"name": "AC3",
|
232 |
+
"type": "bar",
|
233 |
"data": chart_data["AC3"].tolist(),
|
234 |
},
|
235 |
{
|
236 |
"name": "English",
|
237 |
+
"type": "bar",
|
238 |
"data": chart_data["English"].tolist(),
|
239 |
},
|
240 |
{
|
241 |
"name": "Chinese",
|
242 |
+
"type": "bar",
|
243 |
"data": chart_data["Chinese"].tolist(),
|
244 |
},
|
245 |
{
|
246 |
"name": "Spanish",
|
247 |
+
"type": "bar",
|
248 |
"data": chart_data["Spanish"].tolist(),
|
249 |
},
|
250 |
{
|
251 |
"name": "Vietnamese",
|
252 |
+
"type": "bar",
|
253 |
"data": chart_data["Vietnamese"].tolist(),
|
254 |
},
|
255 |
],
|
|
|
358 |
"series": [
|
359 |
{
|
360 |
"name": "Overall Accuracy",
|
361 |
+
"type": "bar",
|
362 |
"data": chart_data['Accuracy'].tolist(),
|
363 |
},
|
364 |
|
|
|
438 |
"series": [
|
439 |
{
|
440 |
"name": "BLEU",
|
441 |
+
"type": "bar",
|
442 |
"data": chart_data['BLEU'].tolist(),
|
443 |
},
|
444 |
|
|
|
518 |
"series": [
|
519 |
{
|
520 |
"name": "Average",
|
521 |
+
"type": "bar",
|
522 |
"data": chart_data['Average'].tolist(),
|
523 |
},
|
524 |
{
|
525 |
"name": "ROUGE-1",
|
526 |
+
"type": "bar",
|
527 |
"data": chart_data["ROUGE-1"].tolist(),
|
528 |
},
|
529 |
{
|
530 |
"name": "ROUGE-2",
|
531 |
+
"type": "bar",
|
532 |
"data": chart_data["ROUGE-2"].tolist(),
|
533 |
},
|
534 |
{
|
535 |
"name": "ROUGE-L",
|
536 |
+
"type": "bar",
|
537 |
"data": chart_data["ROUGE-L"].tolist(),
|
538 |
},
|
539 |
|
|
|
567 |
"series": [
|
568 |
{
|
569 |
"name": "Accuracy",
|
570 |
+
"type": "bar",
|
571 |
"data": chart_data['Accuracy'].tolist(),
|
572 |
},
|
573 |
|