sort math clouds
Browse files- handler.py +3 -1
handler.py
CHANGED
|
@@ -430,8 +430,10 @@ def run_math_density(transcript):
|
|
| 430 |
{'text': word, 'value': student_math_word_cloud[word], 'category': "math"})
|
| 431 |
dict_list.append({'text': word, 'value': student_math_word_cloud[word], 'category': "math"})
|
| 432 |
sorted_dict_list = sorted(dict_list, key=lambda x: x['value'], reverse=True)
|
|
|
|
|
|
|
| 433 |
# return sorted_dict_list[:50]
|
| 434 |
-
return sorted_dict_list[:50],
|
| 435 |
|
| 436 |
class EndpointHandler():
|
| 437 |
def __init__(self, path="."):
|
|
|
|
| 430 |
{'text': word, 'value': student_math_word_cloud[word], 'category': "math"})
|
| 431 |
dict_list.append({'text': word, 'value': student_math_word_cloud[word], 'category': "math"})
|
| 432 |
sorted_dict_list = sorted(dict_list, key=lambda x: x['value'], reverse=True)
|
| 433 |
+
sorted_teacher_dict_list = sorted(teacher_dict_list, key=lambda x: x['value'], reverse=True)
|
| 434 |
+
sorted_student_dict_list = sorted(student_dict_list, key=lambda x: x['value'], reverse=True)
|
| 435 |
# return sorted_dict_list[:50]
|
| 436 |
+
return sorted_dict_list[:50], sorted_teacher_dict_list[:50], sorted_student_dict_list[:50]
|
| 437 |
|
| 438 |
class EndpointHandler():
|
| 439 |
def __init__(self, path="."):
|