Chad commited on
Commit
28e2ddf
·
1 Parent(s): d8e9350

fixed casting

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -47,7 +47,7 @@ def generate_reply(user_input, chat_history):
47
  def generate_quiz(subject, num_questions, chat_history):
48
  """Generate a history quiz with multiple-choice questions and append it to the chat."""
49
  try:
50
- num_questions = int(num_questions)
51
  prompt = f"Generate {num_questions} multiple-choice history questions about {subject}. "
52
  prompt += "For each question, provide the question text, four options labeled A, B, C, and D, and at the end of all questions, list the correct answers in the format: 'Correct Answers: X, Y, Z, ...'."
53
 
 
47
  def generate_quiz(subject, num_questions, chat_history):
48
  """Generate a history quiz with multiple-choice questions and append it to the chat."""
49
  try:
50
+ num_questions = str(num_questions)
51
  prompt = f"Generate {num_questions} multiple-choice history questions about {subject}. "
52
  prompt += "For each question, provide the question text, four options labeled A, B, C, and D, and at the end of all questions, list the correct answers in the format: 'Correct Answers: X, Y, Z, ...'."
53