Commit
·
863cee5
1
Parent(s):
5a3c72f
Update app.py
Browse files
app.py
CHANGED
@@ -6,14 +6,15 @@ import pickle
|
|
6 |
import gradio as gr
|
7 |
from query_data import get_chain
|
8 |
|
9 |
-
|
10 |
-
vectorstore = pickle.load(f)
|
11 |
|
12 |
class ChatWrapper:
|
13 |
def __init__(self):
|
14 |
self.lock = Lock()
|
15 |
|
16 |
def set_openai_api_key(self, api_key: str):
|
|
|
|
|
17 |
"""Set the api key and return chain.
|
18 |
If no api_key, then None is returned.
|
19 |
"""
|
|
|
6 |
import gradio as gr
|
7 |
from query_data import get_chain
|
8 |
|
9 |
+
|
|
|
10 |
|
11 |
class ChatWrapper:
|
12 |
def __init__(self):
|
13 |
self.lock = Lock()
|
14 |
|
15 |
def set_openai_api_key(self, api_key: str):
|
16 |
+
with open("vectorstore.pkl", "rb") as f:
|
17 |
+
vectorstore = pickle.load(f)
|
18 |
"""Set the api key and return chain.
|
19 |
If no api_key, then None is returned.
|
20 |
"""
|