wholewhale commited on
Commit
211d0af
·
1 Parent(s): 2545c31

syntax is fun

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -54,15 +54,15 @@ def bot(history):
54
 
55
  def infer(question, history):
56
  try:
57
- res = []
58
- for human, ai in history[:-1]:
59
- pair = (human, ai)
60
- res.append(pair)
61
 
62
- chat_history = res
63
- query = question
64
- result = qa({"question": query, "chat_history": chat_history, "system:":"This is a world-class summarizing AI, be helpful."})
65
- return result["answer"]
66
  except Exception as e:
67
  return f"Error querying chatbot: {str(e)}"
68
 
 
54
 
55
  def infer(question, history):
56
  try:
57
+ res = []
58
+ for human, ai in history[:-1]:
59
+ pair = (human, ai)
60
+ res.append(pair)
61
 
62
+ chat_history = res
63
+ query = question
64
+ result = qa({"question": query, "chat_history": chat_history, "system": "This is a world-class summarizing AI, be helpful."})
65
+ return result["answer"]
66
  except Exception as e:
67
  return f"Error querying chatbot: {str(e)}"
68