Spaces:
Running
Running
johnslegers
commited on
Commit
•
fb3e7b3
1
Parent(s):
1b14225
test
Browse files- modules/app.py +1 -0
- ui/media/main.js +3 -0
modules/app.py
CHANGED
@@ -95,6 +95,7 @@ async def ping():
|
|
95 |
|
96 |
return {'OK'}
|
97 |
except Exception as e:
|
|
|
98 |
print(traceback.format_exc())
|
99 |
return HTTPException(status_code=500, detail=str(e))
|
100 |
|
|
|
95 |
|
96 |
return {'OK'}
|
97 |
except Exception as e:
|
98 |
+
model_is_loading = False
|
99 |
print(traceback.format_exc())
|
100 |
return HTTPException(status_code=500, detail=str(e))
|
101 |
|
ui/media/main.js
CHANGED
@@ -256,11 +256,14 @@ async function healthCheck() {
|
|
256 |
res = await res.json()
|
257 |
|
258 |
if (res[0] == 'OK') {
|
|
|
259 |
setStatus('server', 'online', 'success')
|
260 |
} else {
|
|
|
261 |
setStatus('server', 'offline', 'error')
|
262 |
}
|
263 |
} catch (e) {
|
|
|
264 |
setStatus('server', 'offline', 'error')
|
265 |
}
|
266 |
}
|
|
|
256 |
res = await res.json()
|
257 |
|
258 |
if (res[0] == 'OK') {
|
259 |
+
console.log(res);
|
260 |
setStatus('server', 'online', 'success')
|
261 |
} else {
|
262 |
+
console.log(res);
|
263 |
setStatus('server', 'offline', 'error')
|
264 |
}
|
265 |
} catch (e) {
|
266 |
+
console.log(res);
|
267 |
setStatus('server', 'offline', 'error')
|
268 |
}
|
269 |
}
|