Spaces:
Sleeping
Sleeping
File size: 1,269 Bytes
aa5cda2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
"""System health check page"""
import streamlit as st
from components import render_sidebar
from utils import client
st.set_page_config(page_title="Health Check", page_icon="π₯")
render_sidebar()
st.title("π₯ System Health Check")
if st.button("π Check Backend Status", use_container_width=True):
with st.spinner("Checking..."):
health = client.health_check()
if health.get("status") == "healthy":
st.success("β
Backend is running and healthy!")
# Display details
col1, col2 = st.columns(2)
with col1:
st.metric("Status", health.get("status", "unknown"))
st.metric("Service", health.get("service", "unknown"))
with col2:
st.metric("LLM Model", health.get("llm_model", "unknown"))
st.metric("Environment", health.get("environment", "unknown"))
st.divider()
# Display full response
st.subheader("π Full Response")
st.json(health)
else:
st.error("β Backend is not responding or unhealthy")
if "detail" in health:
st.error(f"Details: {health['detail']}")
|