Commit
·
a60e09d
1
Parent(s):
8fbd8e0
Update app.py
Browse files
app.py
CHANGED
@@ -5,9 +5,9 @@ import gradio as gr
|
|
5 |
import pickle
|
6 |
from query_data import get_chain
|
7 |
from threading import Lock
|
|
|
|
|
8 |
|
9 |
-
with open("vectorstore.pkl", "rb") as f:
|
10 |
-
vectorstore = pickle.load(f)
|
11 |
|
12 |
|
13 |
|
@@ -21,6 +21,11 @@ class ChatWrapper:
|
|
21 |
"""Execute the chat functionality."""
|
22 |
self.lock.acquire()
|
23 |
try:
|
|
|
|
|
|
|
|
|
|
|
24 |
history = history or []
|
25 |
chain = get_chain(vectorstore)
|
26 |
# If chain is None, that is because no API key was provided.
|
|
|
5 |
import pickle
|
6 |
from query_data import get_chain
|
7 |
from threading import Lock
|
8 |
+
from ingest_data import get_vectorstore
|
9 |
+
|
10 |
|
|
|
|
|
11 |
|
12 |
|
13 |
|
|
|
21 |
"""Execute the chat functionality."""
|
22 |
self.lock.acquire()
|
23 |
try:
|
24 |
+
vs = get_vectorstore("vectorstore.pkl")
|
25 |
+
|
26 |
+
with open(vs "rb") as f:
|
27 |
+
vectorstore = pickle.load(f)
|
28 |
+
|
29 |
history = history or []
|
30 |
chain = get_chain(vectorstore)
|
31 |
# If chain is None, that is because no API key was provided.
|