Dalageo commited on
Commit
47e834e
·
verified ·
1 Parent(s): a69e453

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -19,8 +19,10 @@ def calculator_tool(expression: str)-> str: # Returns a string result
19
  The result of the calculation.
20
  """
21
  try:
22
- api_url = "963LYK-E4A8XXUHW4"
23
- response = requests.post(api_url, json={"expr": expression})
 
 
24
 
25
  if response.status_code == 200:
26
  return f"Result: {response.json()}"
 
19
  The result of the calculation.
20
  """
21
  try:
22
+ app_id = "963LYK-E4A8XXUHW4" # Your Wolfram Alpha App ID
23
+ api_url = f"https://api.wolframalpha.com/v1/result?appid={app_id}&i={expression}"
24
+
25
+ response = requests.get(api_url)
26
 
27
  if response.status_code == 200:
28
  return f"Result: {response.json()}"