Spaces:
Sleeping
Sleeping
rameshmoorthy
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -300,6 +300,7 @@ with gr.Blocks(title="Quiz Maker", theme=gr.themes.Default(primary_hue="green",
|
|
300 |
|
301 |
|
302 |
generate_quiz_btn = gr.Button("Generate Quiz!🚀")
|
|
|
303 |
|
304 |
question_radios = [gr.Radio(visible=False), gr.Radio(visible=False), gr.Radio(
|
305 |
visible=False), gr.Radio(visible=False), gr.Radio(visible=False), gr.Radio(visible=False), gr.Radio(visible=False), gr.Radio(
|
@@ -308,7 +309,7 @@ with gr.Blocks(title="Quiz Maker", theme=gr.themes.Default(primary_hue="green",
|
|
308 |
print(question_radios)
|
309 |
|
310 |
@spaces.GPU
|
311 |
-
@generate_quiz_btn.click(inputs=[radio, topic], outputs=question_radios, api_name="generate_quiz")
|
312 |
def generate_quiz(question_difficulty, topic, user_prompt):
|
313 |
top_k_rank=10
|
314 |
RAG_db_=RAG_db.value
|
@@ -379,7 +380,7 @@ with gr.Blocks(title="Quiz Maker", theme=gr.themes.Default(primary_hue="green",
|
|
379 |
|
380 |
print('Question radio list ' , question_radio_list)
|
381 |
|
382 |
-
return question_radio_list
|
383 |
|
384 |
check_button = gr.Button("Check Score")
|
385 |
|
|
|
300 |
|
301 |
|
302 |
generate_quiz_btn = gr.Button("Generate Quiz!🚀")
|
303 |
+
quiz_msg=gr.Textbox()
|
304 |
|
305 |
question_radios = [gr.Radio(visible=False), gr.Radio(visible=False), gr.Radio(
|
306 |
visible=False), gr.Radio(visible=False), gr.Radio(visible=False), gr.Radio(visible=False), gr.Radio(visible=False), gr.Radio(
|
|
|
309 |
print(question_radios)
|
310 |
|
311 |
@spaces.GPU
|
312 |
+
@generate_quiz_btn.click(inputs=[radio, topic], outputs=[quiz_msg,question_radios], api_name="generate_quiz")
|
313 |
def generate_quiz(question_difficulty, topic, user_prompt):
|
314 |
top_k_rank=10
|
315 |
RAG_db_=RAG_db.value
|
|
|
380 |
|
381 |
print('Question radio list ' , question_radio_list)
|
382 |
|
383 |
+
return 'Quiz Generated!', question_radio_list
|
384 |
|
385 |
check_button = gr.Button("Check Score")
|
386 |
|