KvrParaskevi commited on
Commit
36ca46b
·
verified ·
1 Parent(s): d767fb3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -49,10 +49,9 @@ chat_history = []
49
 
50
  def chat_output(inputs):
51
  output = chat_interface(inputs)
52
- answer = output.split('AI:')
53
- if(len(answer) == 2):
54
- chat_history.append((inputs, answer[1]))
55
- chat_history.append((inputs, answer[1]))
56
  return chat_history
57
 
58
  template = """You are an AI having conversation with a human.
 
49
 
50
  def chat_output(inputs):
51
  output = chat_interface(inputs)
52
+ answer_after_input = output.split('AI:')
53
+ answer = answer_after_input.split('Human:')
54
+ chat_history.append((inputs, answer[0]))
 
55
  return chat_history
56
 
57
  template = """You are an AI having conversation with a human.