fffiloni commited on
Commit
0335ad6
1 Parent(s): 365fff6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- res.append(f"Human:{human}\nAI:{ai}")
48
- "\n".join(res)
49
- chat_history = res[0]
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})