Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- 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 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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')
|