Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,13 +11,15 @@ from Gradio_UI import GradioUI
|
|
| 11 |
@tool
|
| 12 |
def calculator(expression: str)-> str: # Returns a string result
|
| 13 |
"""
|
| 14 |
-
A tool
|
| 15 |
|
| 16 |
Args:
|
| 17 |
expression: A mathematical expression to solve (e.g., "1+2", "3*5").
|
| 18 |
|
| 19 |
Returns:
|
| 20 |
str: The result of the calculation if successful, or an error message if the request fails.
|
|
|
|
|
|
|
| 21 |
"""
|
| 22 |
try:
|
| 23 |
# app_id = "replace_with_your_Wolfram_ID" # Your Wolfram Alpha App ID
|
|
|
|
| 11 |
@tool
|
| 12 |
def calculator(expression: str)-> str: # Returns a string result
|
| 13 |
"""
|
| 14 |
+
A tool able to solve mathematical expressions using the Wolfram Alpha API.
|
| 15 |
|
| 16 |
Args:
|
| 17 |
expression: A mathematical expression to solve (e.g., "1+2", "3*5").
|
| 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
|