fix streamlit error

This commit is contained in:
gabdevele
2026-06-02 21:14:11 +02:00 Unverified
parent bd69534f26
commit 4b8067748e
5 changed files with 909 additions and 9 deletions
+8 -7
View File
@@ -37,13 +37,6 @@ def json_input(label: str, value: dict[str, Any]) -> dict[str, Any] | None:
if "base_url" not in st.session_state:
st.session_state.base_url = "http://127.0.0.1:5555/api/v1"
with st.sidebar:
st.text_input("Backend API", key="base_url")
st.text_input("Bearer token", key="token", type="password")
st.link_button("MailHog", "http://127.0.0.1:8025")
if st.button("Health check"):
show_response(requests.get(api_url("/health"), timeout=5))
st.title("Visione API Lab")
auth_tab, reports_tab, admin_tab, docs_tab = st.tabs(
@@ -204,3 +197,11 @@ with docs_tab:
st.link_button("Swagger UI", api_url("/docs"))
if st.button("Fetch OpenAPI"):
show_response(requests.get(api_url("/openapi.json"), timeout=10))
with st.sidebar:
st.text_input("Backend API", key="base_url")
st.text_input("Bearer token", key="token", type="password")
st.link_button("MailHog", "http://127.0.0.1:8025")
if st.button("Health check"):
show_response(requests.get(api_url("/health"), timeout=5))