rwitz commited on
Commit
360577c
1 Parent(s): a1465ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -90,6 +90,8 @@ def user_ask(state, chatbot1, chatbot2, textbox):
90
 
91
  # Updating state with the current ELO ratings
92
  state["elo_ratings"] = read_elo_ratings()
 
 
93
  state["history"].extend([
94
  {"role": "user", "content": user_input}])
95
  # Chat with bots
 
90
 
91
  # Updating state with the current ELO ratings
92
  state["elo_ratings"] = read_elo_ratings()
93
+ if "history" not in state:
94
+ state['history']=[]
95
  state["history"].extend([
96
  {"role": "user", "content": user_input}])
97
  # Chat with bots