Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,9 +18,9 @@ def calculator(expression: str)-> str: # Returns a string result
|
|
| 18 |
|
| 19 |
Returns:
|
| 20 |
str: The result of the calculation if successful, or an error message if the request fails.
|
| 21 |
-
|
| 22 |
-
Note: The input string may contain spaces. Ensure you remove them before performing the calculation.
|
| 23 |
"""
|
|
|
|
|
|
|
| 24 |
try:
|
| 25 |
# app_id = "replace_with_your_Wolfram_ID" # Your Wolfram Alpha App ID
|
| 26 |
app_id = "963LYK-E4A8XXUHW4" # Your Wolfram Alpha App ID
|
|
|
|
| 18 |
|
| 19 |
Returns:
|
| 20 |
str: The result of the calculation if successful, or an error message if the request fails.
|
|
|
|
|
|
|
| 21 |
"""
|
| 22 |
+
# Remove spaces
|
| 23 |
+
expression = expression.replace(" ","")
|
| 24 |
try:
|
| 25 |
# app_id = "replace_with_your_Wolfram_ID" # Your Wolfram Alpha App ID
|
| 26 |
app_id = "963LYK-E4A8XXUHW4" # Your Wolfram Alpha App ID
|