Deevyankar commited on
Commit
7ea2819
Β·
verified Β·
1 Parent(s): 5ad4905

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
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 important final exam 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,7 +153,7 @@ def update_mode(mode):
153
  "MCQ quiz": "βœ… MCQ quiz",
154
  "Case study": "🏭 Case study",
155
  "Flashcards": "🧠 Flashcards",
156
- "Important exam questions": "πŸŽ“ 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("πŸŽ“ Exam Qs")
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()