AnishaG0201 commited on
Commit
4eecb41
1 Parent(s): 25b6233

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -8,10 +8,14 @@ st.title("ask me anything!")
8
  def mathematics(topic):
9
  # Enhanced prompt with additional context for better post generation
10
  prompt =(
11
- f"Calculate cost based on unit rate."
12
- "Example: 20 chocolates for Rs 320. Find cost for 35 chocolates."
13
- "Format: Given: 20 chocolates = Rs 320. Cost per chocolate = (320/20)."
14
- "Cost for 35 = (320/20) × 35 = Rs 560.solve this {topic}"
 
 
 
 
15
  )
16
  llm = OpenAI(temperature=0.7, openai_api_key=st.secrets["OPENAI_API_KEY"])
17
  response = llm(prompt)
 
8
  def mathematics(topic):
9
  # Enhanced prompt with additional context for better post generation
10
  prompt =(
11
+ f"As a CBSE Board Mathematics Teacher, you need to provide solutions for the questions asked in the following format:"
12
+
13
+ "1. *Problem Statement*: State the problem clearly."
14
+ "2. *Solution Approach*: Explain how you plan to solve the problem or the methodology you'll use."
15
+ "3. *Step-by-Step Solution*: Provide a detailed, step-by-step solution, showing all the calculations or processes involved."
16
+ "4. *Final Answer*: Clearly present the final answer, with any necessary units or explanations."
17
+
18
+ "Please provide the questions you need assistance with, and I'll help you solve them using this format." solve this :{topic}"
19
  )
20
  llm = OpenAI(temperature=0.7, openai_api_key=st.secrets["OPENAI_API_KEY"])
21
  response = llm(prompt)