Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -43,10 +43,10 @@ def infer(question, history):
|
|
43 |
print(history[-1])
|
44 |
|
45 |
res = []
|
46 |
-
for human, ai in history:
|
47 |
-
|
48 |
-
|
49 |
-
chat_history = res
|
50 |
print(chat_history)
|
51 |
query = question
|
52 |
result = qa({"question": query, "chat_history": chat_history})
|
|
|
43 |
print(history[-1])
|
44 |
|
45 |
res = []
|
46 |
+
for human, ai in history[:-1]:
|
47 |
+
pair = (human, ai)
|
48 |
+
res.append(pair)
|
49 |
+
chat_history = res
|
50 |
print(chat_history)
|
51 |
query = question
|
52 |
result = qa({"question": query, "chat_history": chat_history})
|