Spaces:
Sleeping
Sleeping
Update frontend.py
Browse files- frontend.py +2 -2
frontend.py
CHANGED
|
@@ -6,8 +6,8 @@ history = []
|
|
| 6 |
|
| 7 |
def calculate(expression):
|
| 8 |
try:
|
| 9 |
-
# Use
|
| 10 |
-
api_url = "
|
| 11 |
|
| 12 |
response = requests.post(api_url, json={"expr": expression})
|
| 13 |
if response.status_code == 200:
|
|
|
|
| 6 |
|
| 7 |
def calculate(expression):
|
| 8 |
try:
|
| 9 |
+
# Use the current page's path as the API endpoint
|
| 10 |
+
api_url = "calculate"
|
| 11 |
|
| 12 |
response = requests.post(api_url, json={"expr": expression})
|
| 13 |
if response.status_code == 200:
|