Commit
·
349cde4
1
Parent(s):
23827b5
Update app.py
Browse files
app.py
CHANGED
@@ -44,10 +44,10 @@ class ChatWrapper:
|
|
44 |
print("Human:")
|
45 |
import openai
|
46 |
openai.api_key = api_key
|
47 |
-
|
48 |
-
|
49 |
print("AI:")
|
50 |
-
print(
|
51 |
chatResult = (output, history)
|
52 |
|
53 |
except Exception as e:
|
|
|
44 |
print("Human:")
|
45 |
import openai
|
46 |
openai.api_key = api_key
|
47 |
+
output = qa_chain({"question": inp, "chat_history": history})
|
48 |
+
history.append((inp, output))
|
49 |
print("AI:")
|
50 |
+
print(output["answer"])
|
51 |
chatResult = (output, history)
|
52 |
|
53 |
except Exception as e:
|