shukdevdatta123 commited on
Commit
15c06a2
·
verified ·
1 Parent(s): 538869a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -305,8 +305,16 @@ if openai_api_key:
305
  solution = generate_math_solution(math_query)
306
 
307
  # Render the solution with LaTeX for mathematical notations
308
- st.write("### Solution and Explanation:")
309
- st.markdown(f"**Solution:**\n\n{solution}")
 
 
 
 
 
 
 
 
310
  else:
311
  st.error("Please enter a math problem to solve.")
312
 
 
305
  solution = generate_math_solution(math_query)
306
 
307
  # Render the solution with LaTeX for mathematical notations
308
+ formatted_solution = f"""
309
+ ### Solution to the Problem
310
+ **Problem:** {math_query}
311
+
312
+ **Solution:**
313
+
314
+ {solution}
315
+ """
316
+
317
+ st.markdown(formatted_solution)
318
  else:
319
  st.error("Please enter a math problem to solve.")
320