Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -112,7 +112,7 @@ def build_prompt(question, mode):
|
|
| 112 |
"MCQ quiz": "Create 5 MCQs with 4 options each. Give correct answer and short explanation.",
|
| 113 |
"Case study": "Create or answer a case-study question using energy analytics context.",
|
| 114 |
"Flashcards": "Generate 10 flashcards in Q/A format.",
|
| 115 |
-
"Important exam questions": "Generate
|
| 116 |
"Teacher may ask": "Give high-probability exam-focused questions from this topic and provide model answers."
|
| 117 |
}[mode]
|
| 118 |
|
|
@@ -153,7 +153,7 @@ def update_mode(mode):
|
|
| 153 |
"MCQ quiz": "β
MCQ quiz",
|
| 154 |
"Case study": "π Case study",
|
| 155 |
"Flashcards": "π§ Flashcards",
|
| 156 |
-
"Important exam questions": "
|
| 157 |
"Teacher may ask": "π― Likely Exam Questions"
|
| 158 |
}
|
| 159 |
return mode, f"<div class='mode-chip'>{labels[mode]}</div>"
|
|
@@ -848,9 +848,7 @@ def main():
|
|
| 848 |
|
| 849 |
with gr.Row():
|
| 850 |
btn_flash = gr.Button("π§ Flashcards")
|
| 851 |
-
btn_exam = gr.Button("
|
| 852 |
-
|
| 853 |
-
btn_teacher = gr.Button("π― Likely Exam Questions", variant="primary")
|
| 854 |
|
| 855 |
mode = gr.State("Explain in detail")
|
| 856 |
mode_display = gr.HTML("<div class='mode-chip'>π Explain in detail</div>")
|
|
@@ -905,7 +903,6 @@ def main():
|
|
| 905 |
btn_case.click(lambda: update_mode("Case study"), inputs=[], outputs=[mode, mode_display])
|
| 906 |
btn_flash.click(lambda: update_mode("Flashcards"), inputs=[], outputs=[mode, mode_display])
|
| 907 |
btn_exam.click(lambda: update_mode("Important exam questions"), inputs=[], outputs=[mode, mode_display])
|
| 908 |
-
btn_teacher.click(lambda: update_mode("Teacher may ask"), inputs=[], outputs=[mode, mode_display])
|
| 909 |
|
| 910 |
try:
|
| 911 |
load_index()
|
|
|
|
| 112 |
"MCQ quiz": "Create 5 MCQs with 4 options each. Give correct answer and short explanation.",
|
| 113 |
"Case study": "Create or answer a case-study question using energy analytics context.",
|
| 114 |
"Flashcards": "Generate 10 flashcards in Q/A format.",
|
| 115 |
+
"Important exam questions": "Generate a complete exam preparation question bank with short-answer, long-answer, MCQ, numerical, and case-study questions with model answers.",
|
| 116 |
"Teacher may ask": "Give high-probability exam-focused questions from this topic and provide model answers."
|
| 117 |
}[mode]
|
| 118 |
|
|
|
|
| 153 |
"MCQ quiz": "β
MCQ quiz",
|
| 154 |
"Case study": "π Case study",
|
| 155 |
"Flashcards": "π§ Flashcards",
|
| 156 |
+
"Important exam questions": "π Question Bank",
|
| 157 |
"Teacher may ask": "π― Likely Exam Questions"
|
| 158 |
}
|
| 159 |
return mode, f"<div class='mode-chip'>{labels[mode]}</div>"
|
|
|
|
| 848 |
|
| 849 |
with gr.Row():
|
| 850 |
btn_flash = gr.Button("π§ Flashcards")
|
| 851 |
+
btn_exam = gr.Button("π Question Bank", variant="primary")
|
|
|
|
|
|
|
| 852 |
|
| 853 |
mode = gr.State("Explain in detail")
|
| 854 |
mode_display = gr.HTML("<div class='mode-chip'>π Explain in detail</div>")
|
|
|
|
| 903 |
btn_case.click(lambda: update_mode("Case study"), inputs=[], outputs=[mode, mode_display])
|
| 904 |
btn_flash.click(lambda: update_mode("Flashcards"), inputs=[], outputs=[mode, mode_display])
|
| 905 |
btn_exam.click(lambda: update_mode("Important exam questions"), inputs=[], outputs=[mode, mode_display])
|
|
|
|
| 906 |
|
| 907 |
try:
|
| 908 |
load_index()
|