KeenWoo commited on
Commit
4fe2d98
·
verified ·
1 Parent(s): 4cd802c

Update app_AD2class.py

Browse files
Files changed (1) hide show
  1. app_AD2class.py +3 -3
app_AD2class.py CHANGED
@@ -48,9 +48,9 @@ def save_final_answer(current_index, current_answer, all_answers):
48
  all_answers[current_index] = current_answer
49
  return all_answers
50
 
51
- def process_evaluation(answers, image_upload):
52
  """Calls the evaluation function from the MMSE module and prepares UI updates."""
53
- score_lines, total = MMSE.evaluate(answers, image_upload)
54
  # This function now returns the data AND the UI updates
55
  return score_lines, total, gr.update(visible=False), gr.update(visible=True)
56
 
@@ -119,7 +119,7 @@ def build_ui():
119
  submit_btn.click(
120
  save_final_answer, inputs=[question_index, answer_text, answers], outputs=answers
121
  ).then(
122
- fn=process_evaluation, inputs=[answers, image_upload], outputs=[score_lines, total, submit_btn, start_over_btn]
123
  )
124
 
125
  reset_outputs = [question_index, answers, score_lines, total, question_button, progress_text,
 
48
  all_answers[current_index] = current_answer
49
  return all_answers
50
 
51
+ def process_evaluation_MMSE(answers, image_upload):
52
  """Calls the evaluation function from the MMSE module and prepares UI updates."""
53
+ score_lines, total = MMSE.evaluate_MMSE(answers, image_upload)
54
  # This function now returns the data AND the UI updates
55
  return score_lines, total, gr.update(visible=False), gr.update(visible=True)
56
 
 
119
  submit_btn.click(
120
  save_final_answer, inputs=[question_index, answer_text, answers], outputs=answers
121
  ).then(
122
+ fn=process_evaluation_MMSE, inputs=[answers, image_upload], outputs=[score_lines, total, submit_btn, start_over_btn]
123
  )
124
 
125
  reset_outputs = [question_index, answers, score_lines, total, question_button, progress_text,