Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -53,12 +53,12 @@ def infer(question, history):
|
|
53 |
results = []
|
54 |
for human, ai in history[:-1]:
|
55 |
pair = (human, ai)
|
56 |
-
|
57 |
|
58 |
chat_history = results
|
59 |
print(chat_history)
|
60 |
query = question
|
61 |
-
result =
|
62 |
print(result)
|
63 |
return result["answer"]
|
64 |
|
|
|
53 |
results = []
|
54 |
for human, ai in history[:-1]:
|
55 |
pair = (human, ai)
|
56 |
+
results.append(pair)
|
57 |
|
58 |
chat_history = results
|
59 |
print(chat_history)
|
60 |
query = question
|
61 |
+
result = pdf_qa({"question": query, "chat_history": chat_history})
|
62 |
print(result)
|
63 |
return result["answer"]
|
64 |
|