Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,22 @@ client = chromadb.PersistentClient(path=path)
|
|
14 |
import streamlit as st
|
15 |
from PIL import Image as PILImage
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
def add_background_image(image_path):
|
18 |
with open(image_path, "rb") as image_file:
|
19 |
base64_image = base64.b64encode(image_file.read()).decode()
|
@@ -203,8 +219,8 @@ def format_prompt_inputs(image_collection, text_collection, video_collection, us
|
|
203 |
import time # To simulate delays during processing
|
204 |
|
205 |
def page_1():
|
206 |
-
st.
|
207 |
-
|
208 |
uploaded_file = st.file_uploader("Upload a PDF file", type=["pdf"])
|
209 |
if uploaded_file:
|
210 |
pdf_path = f"/tmp/{uploaded_file.name}"
|
@@ -232,7 +248,7 @@ def page_1():
|
|
232 |
st.error(f"Error processing PDF: {e}")
|
233 |
|
234 |
def page_2():
|
235 |
-
st.
|
236 |
|
237 |
if "image_collection" in st.session_state and "text_collection" in st.session_state and "video_collection" in st.session_state:
|
238 |
image_collection = st.session_state.image_collection
|
|
|
14 |
import streamlit as st
|
15 |
from PIL import Image as PILImage
|
16 |
|
17 |
+
def set_title_style():
|
18 |
+
css = """
|
19 |
+
<style>
|
20 |
+
.title {
|
21 |
+
font-family: Arial, sans-serif;
|
22 |
+
font-size: 3rem;
|
23 |
+
font-weight: bold;
|
24 |
+
background: linear-gradient(to right, gold, black);
|
25 |
+
-webkit-background-clip: text;
|
26 |
+
-webkit-text-fill-color: transparent;
|
27 |
+
text-align: center;
|
28 |
+
}
|
29 |
+
</style>
|
30 |
+
"""
|
31 |
+
st.markdown(css, unsafe_allow_html=True)
|
32 |
+
|
33 |
def add_background_image(image_path):
|
34 |
with open(image_path, "rb") as image_file:
|
35 |
base64_image = base64.b64encode(image_file.read()).decode()
|
|
|
219 |
import time # To simulate delays during processing
|
220 |
|
221 |
def page_1():
|
222 |
+
st.markdown('<div class="title">ADMIN</div>', unsafe_allow_html=True)
|
223 |
+
|
224 |
uploaded_file = st.file_uploader("Upload a PDF file", type=["pdf"])
|
225 |
if uploaded_file:
|
226 |
pdf_path = f"/tmp/{uploaded_file.name}"
|
|
|
248 |
st.error(f"Error processing PDF: {e}")
|
249 |
|
250 |
def page_2():
|
251 |
+
st.markdown('<div class="title">Poss Assistant</div>', unsafe_allow_html=True)
|
252 |
|
253 |
if "image_collection" in st.session_state and "text_collection" in st.session_state and "video_collection" in st.session_state:
|
254 |
image_collection = st.session_state.image_collection
|