Update app.py
Browse files
app.py
CHANGED
@@ -91,9 +91,9 @@ def generate_response(user_message,
|
|
91 |
|
92 |
|
93 |
example_messages = {
|
94 |
-
"JEE
|
95 |
-
"
|
96 |
-
"
|
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
|
161 |
-
example2_button = gr.Button("
|
162 |
-
example3_button = gr.Button("
|
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
|
220 |
-
example2_button.click(fn=lambda: gr.update(value=example_messages["
|
221 |
-
example3_button.click(fn=lambda: gr.update(value=example_messages["
|
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 |
+
"IIT-JEE 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?",
|
95 |
+
"IIT-JEE 2024 Physics": "The specific heat capacity of a substance is temperature dependent and is given by the formula C=kT, where k is a constant of suitable dimensions in SI units, and T is the absolute temperature. If the heat required to raise the temperature of 1 kg of the substance from –73°C to 27°C is nk, the value of n is?",
|
96 |
+
"Goldman Sachs Interview Puzzle": "Four friends need to cross a dangerous bridge at night. Unfortunately, they have only one torch and the bridge is too dangerous to cross without one. The bridge is only strong enough to support two people at a time. Not all people take the same time to cross the bridge. Times for each person: 1 min, 2 mins, 7 mins and 10 mins. What is the shortest time needed for all four of them to cross the bridge?",
|
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("IIT-JEE 2024 Mathematics")
|
161 |
+
example2_button = gr.Button("IIT-JEE 2024 Physics")
|
162 |
+
example3_button = gr.Button("Goldman Sachs Interview Puzzle")
|
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["IIT-JEE 2024 Mathematics"]), inputs=None, outputs=user_input)
|
220 |
+
example2_button.click(fn=lambda: gr.update(value=example_messages["IIT-JEE 2024 Physics"]), inputs=None, outputs=user_input)
|
221 |
+
example3_button.click(fn=lambda: gr.update(value=example_messages["Goldman Sachs Interview Puzzle"]), 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)
|