Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,14 +8,13 @@ st.title("ask me anything!")
|
|
| 8 |
def mathematics(topic):
|
| 9 |
# Enhanced prompt with additional context for better post generation
|
| 10 |
prompt =(
|
| 11 |
-
f"
|
| 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 |
-
"solve the question 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)
|
|
|
|
| 8 |
def mathematics(topic):
|
| 9 |
# Enhanced prompt with additional context for better post generation
|
| 10 |
prompt =(
|
| 11 |
+
f"solve this :{topic} 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 |
)
|
| 19 |
llm = OpenAI(temperature=0.7, openai_api_key=st.secrets["OPENAI_API_KEY"])
|
| 20 |
response = llm(prompt)
|