meraKB / explorer.py
Asankhaya Sharma
add user authentication
8a70a7b
raw
history blame
No virus
560 Bytes
import streamlit as st
def view_document(supabase):
# Get the document from the database
response = supabase.table("documents").select("content").filter('metadata->>user', 'eq', st.session_state["username"]).execute()
# st.write("**This feature is in active development**")
# Display a list of elements from the documents
# If the user clicks on an element, display the content of the document
for document in response.data:
if st.button(document['content'][:50].replace("\n", " ")):
st.write(document['content'])