Commit
·
8daf606
1
Parent(s):
0b63d0b
Update app.py
Browse files
app.py
CHANGED
@@ -27,17 +27,19 @@ class ChatWrapper:
|
|
27 |
def __call__(self, inp: str, history: Optional[Tuple[str, str]]):
|
28 |
self.lock.acquire()
|
29 |
api_key = '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'
|
30 |
-
chain = self.set_openai_api_key(api_key)
|
31 |
try:
|
32 |
|
33 |
|
34 |
-
|
35 |
|
36 |
|
37 |
with open("vectorstore.pkl", "rb") as f:
|
38 |
vectorstore = pickle.load(f)
|
|
|
39 |
os.environ["OPENAI_API_KEY"] = api_key
|
40 |
qa_chain = get_chain(vectorstore)
|
|
|
41 |
print("Chat with your docs!")
|
42 |
while True:
|
43 |
print("Human:")
|
|
|
27 |
def __call__(self, inp: str, history: Optional[Tuple[str, str]]):
|
28 |
self.lock.acquire()
|
29 |
api_key = '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'
|
30 |
+
#chain = self.set_openai_api_key(api_key)
|
31 |
try:
|
32 |
|
33 |
|
34 |
+
|
35 |
|
36 |
|
37 |
with open("vectorstore.pkl", "rb") as f:
|
38 |
vectorstore = pickle.load(f)
|
39 |
+
|
40 |
os.environ["OPENAI_API_KEY"] = api_key
|
41 |
qa_chain = get_chain(vectorstore)
|
42 |
+
|
43 |
print("Chat with your docs!")
|
44 |
while True:
|
45 |
print("Human:")
|