Dannyar608 commited on
Commit
a7c9f79
·
verified ·
1 Parent(s): 2c68bd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -263,8 +263,9 @@ class LearningStyleQuiz:
263
  }
264
  }
265
 
266
- def evaluate_quiz(self, answers: List[str]) -> str:
267
  """Evaluate quiz answers and generate results."""
 
268
  if len(answers) != len(self.questions):
269
  raise gr.Error("Not all questions were answered")
270
 
@@ -841,7 +842,7 @@ def create_interface():
841
  )
842
 
843
  quiz_submit.click(
844
- fn=learning_style_quiz.evaluate_quiz,
845
  inputs=quiz_components,
846
  outputs=learning_output
847
  ).then(
@@ -945,9 +946,7 @@ def create_interface():
945
  "How can I improve my grades in science?",
946
  "What study methods match my learning style?"
947
  ],
948
- title="",
949
- retry_btn=None,
950
- undo_btn=None
951
  )
952
 
953
  # Tab navigation buttons
 
263
  }
264
  }
265
 
266
+ def evaluate_quiz(self, *answers) -> str:
267
  """Evaluate quiz answers and generate results."""
268
+ answers = list(answers) # Convert tuple to list
269
  if len(answers) != len(self.questions):
270
  raise gr.Error("Not all questions were answered")
271
 
 
842
  )
843
 
844
  quiz_submit.click(
845
+ fn=lambda *answers: learning_style_quiz.evaluate_quiz(answers),
846
  inputs=quiz_components,
847
  outputs=learning_output
848
  ).then(
 
946
  "How can I improve my grades in science?",
947
  "What study methods match my learning style?"
948
  ],
949
+ title=""
 
 
950
  )
951
 
952
  # Tab navigation buttons