fffiloni commited on
Commit
37e534a
1 Parent(s): 4a9ac6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -41,7 +41,13 @@ def bot(history):
41
 
42
  def infer(question, history):
43
  print(history[-1])
44
- chat_history = []
 
 
 
 
 
 
45
  query = question
46
  result = qa({"question": query, "chat_history": chat_history})
47
  print(result)
 
41
 
42
  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
50
+ print(chat_history)
51
  query = question
52
  result = qa({"question": query, "chat_history": chat_history})
53
  print(result)