Mpavan45 commited on
Commit
76d0d38
·
verified ·
1 Parent(s): 8f2a069

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +8 -3
src/streamlit_app.py CHANGED
@@ -54,9 +54,14 @@ if st.sidebar.button("🔁 End Chat"):
54
  memory_buffer["chat_history"] = []
55
 
56
  # Extract Chroma DB ZIP (only if not already extracted)
57
- if not os.path.exists("chroma_db"):
58
- with zipfile.ZipFile('chroma_db1.zip', 'r') as zip_ref:
59
- zip_ref.extractall('chroma_db')
 
 
 
 
 
60
 
61
  # Load embeddings & vector DB
62
  embedding = HuggingFaceEmbeddings(model_name='all-MiniLM-L6-v2')
 
54
  memory_buffer["chat_history"] = []
55
 
56
  # Extract Chroma DB ZIP (only if not already extracted)
57
+
58
+ zip_path = 'src/chroma_db1.zip'
59
+ extract_path = 'chroma_db'
60
+
61
+ if not os.path.exists(extract_path):
62
+ with zipfile.ZipFile(zip_path, 'r') as zip_ref:
63
+ zip_ref.extractall(extract_path)
64
+
65
 
66
  # Load embeddings & vector DB
67
  embedding = HuggingFaceEmbeddings(model_name='all-MiniLM-L6-v2')