summaryrefslogtreecommitdiff
path: root/rag/ui.py
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-06 13:14:40 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-06 13:14:40 +0200
commitd116abc63e350b092c2a7f9e1bb9b54298e21b2d (patch)
tree222878c027cf95898b8e6b102714754dae53afd2 /rag/ui.py
parenteaab8f8756bc3da1eae517dfecfb61c022ec62fd (diff)
Wip streamlit
Diffstat (limited to 'rag/ui.py')
-rw-r--r--rag/ui.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/rag/ui.py b/rag/ui.py
new file mode 100644
index 0000000..1e4dd64
--- /dev/null
+++ b/rag/ui.py
@@ -0,0 +1,20 @@
+import streamlit as st
+
+
+# from loguru import logger as log
+# from rag.rag import RAG
+
+def upload_pdfs():
+ files = st.file_uploader(
+ "Choose pdfs to add to the knowledge base",
+ type="pdf",
+ accept_multiple_files=True,
+ )
+ for file in files:
+ bytes = file.read()
+ st.write(bytes)
+
+
+if __name__ == "__main__":
+ st.header("RAG-UI")
+ upload_pdfs()