quivr/streamlit-demo/sidebar.py

11 lines
351 B
Python
Raw Normal View History

2023-05-13 00:05:31 +03:00
import streamlit as st
def sidebar(supabase):
2023-05-13 00:58:19 +03:00
st.sidebar.title("Database Information")
2023-05-13 00:05:31 +03:00
number_of_docs = number_of_documents(supabase)
st.sidebar.markdown(f"**Docs in DB:** {number_of_docs}")
def number_of_documents(supabase):
documents = supabase.table("documents").select("id", count="exact").execute()
return documents.count