Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,10 +45,10 @@ if st.button("▶ Run Code"):
|
|
| 45 |
with st.spinner("Running your code..."):
|
| 46 |
try:
|
| 47 |
# Send code to backend
|
| 48 |
-
API_URL = "https://your-backend-service.onrender.com/run" # Correct
|
| 49 |
-
|
| 50 |
-
response = requests.post(API_URL, json={"code": user_code}) # Correct API call
|
| 51 |
|
|
|
|
| 52 |
output = response.json().get("output", "Error in execution.")
|
| 53 |
|
| 54 |
# Display output
|
|
|
|
| 45 |
with st.spinner("Running your code..."):
|
| 46 |
try:
|
| 47 |
# Send code to backend
|
| 48 |
+
API_URL = "https://your-backend-service.onrender.com/run" # Correct backend URL
|
| 49 |
+
response = requests.post(API_URL, json={"code": code}) # Correct API call
|
|
|
|
| 50 |
|
| 51 |
+
# Get output
|
| 52 |
output = response.json().get("output", "Error in execution.")
|
| 53 |
|
| 54 |
# Display output
|