Spaces:
Running
Running
AnishaG0201
commited on
Commit
•
25b6233
1
Parent(s):
9243a04
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,12 @@ st.title("ask me anything!")
|
|
7 |
|
8 |
def mathematics(topic):
|
9 |
# Enhanced prompt with additional context for better post generation
|
10 |
-
prompt =
|
|
|
|
|
|
|
|
|
|
|
11 |
llm = OpenAI(temperature=0.7, openai_api_key=st.secrets["OPENAI_API_KEY"])
|
12 |
response = llm(prompt)
|
13 |
return response
|
|
|
7 |
|
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)
|
18 |
return response
|