Spaces:
Runtime error
Runtime error
fix
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def gen_quiz_ques_local(ctxt_txt,ques_type, num_questions):
|
|
22 |
return json.loads(res)
|
23 |
|
24 |
|
25 |
-
def generate_quiz(
|
26 |
if not grade or not num_questions:
|
27 |
return [[], "Please select both grade and number of questions before generating the quiz."] + [gr.update(visible=False) for _ in range(5)]
|
28 |
|
@@ -104,7 +104,7 @@ with gr.Blocks() as app:
|
|
104 |
|
105 |
|
106 |
generate_btn.click(
|
107 |
-
|
108 |
inputs=[context_txt, ques_type, num_questions],
|
109 |
outputs=[quiz_state, quiz_output] + answer_components
|
110 |
)
|
|
|
22 |
return json.loads(res)
|
23 |
|
24 |
|
25 |
+
def generate_quiz(ctxt_txt,ques_type, num_questions):
|
26 |
if not grade or not num_questions:
|
27 |
return [[], "Please select both grade and number of questions before generating the quiz."] + [gr.update(visible=False) for _ in range(5)]
|
28 |
|
|
|
104 |
|
105 |
|
106 |
generate_btn.click(
|
107 |
+
generate_quiz,
|
108 |
inputs=[context_txt, ques_type, num_questions],
|
109 |
outputs=[quiz_state, quiz_output] + answer_components
|
110 |
)
|