SHAMIL SHAHBAZ AWAN commited on
Commit
b1f88af
·
verified ·
1 Parent(s): 458a679

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -6,6 +6,22 @@ import faiss
6
  import numpy as np
7
  from groq import Client
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  # Load Hugging Face Secrets
10
  HUGGINGFACE_KEY = os.getenv("HUGGINGFACE_KEY")
11
  if not HUGGINGFACE_KEY:
@@ -19,7 +35,7 @@ embedder = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
19
 
20
  # Define file path and vector store folder
21
  file_path = "Atomic habits ( PDFDrive ).pdf" # File directly in the root directory of the app
22
- VECTORSTORE_FOLDER = "vectorstore"
23
 
24
  # Ensure the vector store folder exists
25
  if not os.path.exists(VECTORSTORE_FOLDER):
 
6
  import numpy as np
7
  from groq import Client
8
 
9
+ # Set background image
10
+ background_image_url = "https://jamesclear.com/wp-content/uploads/2020/11/atomic-habits_gallery_hi-res_01.jpg"
11
+ st.markdown(
12
+ f"""
13
+ <style>
14
+ .stApp {{
15
+ background-image: url("{background_image_url}");
16
+ background-size: cover;
17
+ background-position: center center;
18
+ background-repeat: no-repeat;
19
+ }}
20
+ </style>
21
+ """,
22
+ unsafe_allow_html=True
23
+ )
24
+
25
  # Load Hugging Face Secrets
26
  HUGGINGFACE_KEY = os.getenv("HUGGINGFACE_KEY")
27
  if not HUGGINGFACE_KEY:
 
35
 
36
  # Define file path and vector store folder
37
  file_path = "Atomic habits ( PDFDrive ).pdf" # File directly in the root directory of the app
38
+ VECTORSTORE_FOLDER = "vectorstore" # Folder in the root directory
39
 
40
  # Ensure the vector store folder exists
41
  if not os.path.exists(VECTORSTORE_FOLDER):