hylee719 commited on
Commit
033b66e
·
verified ·
1 Parent(s): 4b21ac9

sort math clouds

Browse files
Files changed (1) hide show
  1. 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], teacher_dict_list, student_dict_list
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="."):