Spaces:
Runtime error
Runtime error
Shaileshshantaram Kadam commited on
Commit ·
3d4b5b6
1
Parent(s): 4a83326
Updated Vectorstore
Browse files- app.py +1 -1
- chatstore.pkl +3 -0
- cli_app.py +2 -1
- ingest_data.py +2 -1
- vectorstore.pkl +2 -2
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import pickle
|
|
| 6 |
from query_data import get_chain
|
| 7 |
from threading import Lock
|
| 8 |
|
| 9 |
-
with open("
|
| 10 |
vectorstore = pickle.load(f)
|
| 11 |
|
| 12 |
|
|
|
|
| 6 |
from query_data import get_chain
|
| 7 |
from threading import Lock
|
| 8 |
|
| 9 |
+
with open("chatstore.pkl", "rb") as f:
|
| 10 |
vectorstore = pickle.load(f)
|
| 11 |
|
| 12 |
|
chatstore.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:650abfa029dbc8c6bc47227b5c7a1f6dc8b069c0c840061c88687357df9dedc3
|
| 3 |
+
size 11991824
|
cli_app.py
CHANGED
|
@@ -3,7 +3,8 @@ from query_data import get_chain
|
|
| 3 |
|
| 4 |
|
| 5 |
if __name__ == "__main__":
|
| 6 |
-
with open("
|
|
|
|
| 7 |
vectorstore = pickle.load(f)
|
| 8 |
qa_chain = get_chain(vectorstore)
|
| 9 |
chat_history = []
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
if __name__ == "__main__":
|
| 6 |
+
with open("chatstore.pkl", "rb") as f:
|
| 7 |
+
#with open("vectorstore.pkl", "rb") as f:
|
| 8 |
vectorstore = pickle.load(f)
|
| 9 |
qa_chain = get_chain(vectorstore)
|
| 10 |
chat_history = []
|
ingest_data.py
CHANGED
|
@@ -5,6 +5,7 @@ from langchain.embeddings import OpenAIEmbeddings
|
|
| 5 |
import pickle
|
| 6 |
|
| 7 |
# Load Data
|
|
|
|
| 8 |
loader = UnstructuredFileLoader("_chat.txt")
|
| 9 |
raw_documents = loader.load()
|
| 10 |
|
|
@@ -21,6 +22,6 @@ chatstore = FAISS.from_documents(documents, embeddings)
|
|
| 21 |
|
| 22 |
# Save vectorstore
|
| 23 |
with open("chatstore.pkl", "wb") as f:
|
| 24 |
-
|
| 25 |
#with open("vectorstore.pkl", "wb") as f:
|
| 26 |
# pickle.dump(vectorstore, f)
|
|
|
|
| 5 |
import pickle
|
| 6 |
|
| 7 |
# Load Data
|
| 8 |
+
#loader = UnstructuredFileLoader("state_of_the_union.txt")
|
| 9 |
loader = UnstructuredFileLoader("_chat.txt")
|
| 10 |
raw_documents = loader.load()
|
| 11 |
|
|
|
|
| 22 |
|
| 23 |
# Save vectorstore
|
| 24 |
with open("chatstore.pkl", "wb") as f:
|
| 25 |
+
pickle.dump(chatstore, f)
|
| 26 |
#with open("vectorstore.pkl", "wb") as f:
|
| 27 |
# pickle.dump(vectorstore, f)
|
vectorstore.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a6a6b13d702563b2303c6d3d3e87319f085a9f8d992dd6780002cc442ef3bda6
|
| 3 |
+
size 102703
|