Spaces:
Sleeping
Sleeping
yashvardhanshah commited on
Commit ·
718fd67
1
Parent(s): 582b806
debug health check
Browse files
app/frontend/pages/1_Diagnosis.py
CHANGED
|
@@ -125,18 +125,13 @@ with right:
|
|
| 125 |
if uploaded and analyze:
|
| 126 |
with st.spinner("Analyzing... running inference on 448×448 input..."):
|
| 127 |
try:
|
| 128 |
-
#
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
pass
|
| 136 |
-
if i < 5:
|
| 137 |
-
st.toast(f"Model warming up... ({i+1}/6)")
|
| 138 |
-
import time; time.sleep(5)
|
| 139 |
-
|
| 140 |
uploaded.seek(0)
|
| 141 |
files = {"file": (uploaded.name, uploaded, uploaded.type)}
|
| 142 |
resp = requests.post(f"{API_URL}/predict", files=files, timeout=60)
|
|
|
|
| 125 |
if uploaded and analyze:
|
| 126 |
with st.spinner("Analyzing... running inference on 448×448 input..."):
|
| 127 |
try:
|
| 128 |
+
# Debug: check health
|
| 129 |
+
try:
|
| 130 |
+
health = requests.get(f"{API_URL}/health", timeout=5)
|
| 131 |
+
st.write(f"DEBUG: {health.json()}")
|
| 132 |
+
except Exception as ex:
|
| 133 |
+
st.write(f"DEBUG ERROR: {ex}")
|
| 134 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
uploaded.seek(0)
|
| 136 |
files = {"file": (uploaded.name, uploaded, uploaded.type)}
|
| 137 |
resp = requests.post(f"{API_URL}/predict", files=files, timeout=60)
|