Update app.py
Browse files
app.py
CHANGED
@@ -91,9 +91,9 @@ def generate_response(user_message,
|
|
91 |
|
92 |
|
93 |
example_messages = {
|
94 |
-
"JEE Main 2025
|
95 |
-
"
|
96 |
-
"JEE
|
97 |
"JEE Main 2025 Laws of Motion": "A massless spring gets elongated by amount x_1 under a tension of 5 N . Its elongation is x_2 under the tension of 7 N . For the elongation of 5x_1 - 2x_2 , the tension in the spring will be?"
|
98 |
}
|
99 |
|
@@ -157,9 +157,9 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
157 |
clear_button = gr.Button("Clear", scale=1)
|
158 |
gr.Markdown("**Try these examples:**")
|
159 |
with gr.Row():
|
160 |
-
example1_button = gr.Button("JEE Main 2025\
|
161 |
-
example2_button = gr.Button("
|
162 |
-
example3_button = gr.Button("JEE
|
163 |
example4_button = gr.Button("JEE Main 2025\nLaws of Motion")
|
164 |
|
165 |
def update_conversation_list():
|
@@ -216,9 +216,9 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
216 |
outputs=[current_convo_id, history_state, chatbot]
|
217 |
)
|
218 |
|
219 |
-
example1_button.click(fn=lambda: gr.update(value=example_messages["JEE Main 2025
|
220 |
-
example2_button.click(fn=lambda: gr.update(value=example_messages["
|
221 |
-
example3_button.click(fn=lambda: gr.update(value=example_messages["JEE
|
222 |
example4_button.click(fn=lambda: gr.update(value=example_messages["JEE Main 2025 Laws of Motion"]), inputs=None, outputs=user_input)
|
223 |
|
224 |
#demo.launch(share=True, ssr_mode=False)
|
|
|
91 |
|
92 |
|
93 |
example_messages = {
|
94 |
+
"JEE Main 2025 Mathematics": "From all the English alphabets, five letters are chosen and are arranged in alphabetical order. The total number of ways, in which the middle letter is 'M', is?",
|
95 |
+
"Quant Interview Puzzle": "There is a 6x8 rectangular chocolate bar made up of small 1x1 bits. We want to break it into the 48 bits. We can break one piece of chocolate horizontally or vertically, but cannot break two pieces together! What is the minimum number of breaks required?",
|
96 |
+
"JEE Advanced 2024 Mathematics": "A student appears for a quiz consisting of only true-false type questions and answers all the questions. The student knows the answers of some questions and guesses the answers for the remaining questions. Whenever the student knows the answer of a question, he gives the correct answer. Assume that probability of the student giving the correct answer for a question, given that he has guessed it, is $\\frac{1}{2}$. Also assume that the probability of the answer for a question being guessed, given that the student's answer is correct, is $\\frac{1}{6}$. Then the probability that the student knows the answer of a randomly chosen question is?",
|
97 |
"JEE Main 2025 Laws of Motion": "A massless spring gets elongated by amount x_1 under a tension of 5 N . Its elongation is x_2 under the tension of 7 N . For the elongation of 5x_1 - 2x_2 , the tension in the spring will be?"
|
98 |
}
|
99 |
|
|
|
157 |
clear_button = gr.Button("Clear", scale=1)
|
158 |
gr.Markdown("**Try these examples:**")
|
159 |
with gr.Row():
|
160 |
+
example1_button = gr.Button("JEE Main 2025\nMathematics")
|
161 |
+
example2_button = gr.Button("Quant Interview\nPuzzle")
|
162 |
+
example3_button = gr.Button("JEE Advanced 2024\nMathematics")
|
163 |
example4_button = gr.Button("JEE Main 2025\nLaws of Motion")
|
164 |
|
165 |
def update_conversation_list():
|
|
|
216 |
outputs=[current_convo_id, history_state, chatbot]
|
217 |
)
|
218 |
|
219 |
+
example1_button.click(fn=lambda: gr.update(value=example_messages["JEE Main 2025 Mathematics"]), inputs=None, outputs=user_input)
|
220 |
+
example2_button.click(fn=lambda: gr.update(value=example_messages["Quant Interview Puzzle"]), inputs=None, outputs=user_input)
|
221 |
+
example3_button.click(fn=lambda: gr.update(value=example_messages["JEE Advanced 2024 Mathematics"]), inputs=None, outputs=user_input)
|
222 |
example4_button.click(fn=lambda: gr.update(value=example_messages["JEE Main 2025 Laws of Motion"]), inputs=None, outputs=user_input)
|
223 |
|
224 |
#demo.launch(share=True, ssr_mode=False)
|