Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +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 |
-
|
|
|
94 |
# Chat with bots
|
95 |
bot1_response, bot2_response = chat_with_bots(user_input, state)
|
96 |
|
@@ -98,7 +99,6 @@ def user_ask(state, chatbot1, chatbot2, textbox):
|
|
98 |
if "history" not in state:
|
99 |
state["history"] = []
|
100 |
state["history"].extend([
|
101 |
-
{"role": "user", "content": user_input},
|
102 |
{"role": "bot1", "content": bot1_response},
|
103 |
{"role": "bot2", "content": bot2_response}
|
104 |
])
|
|
|
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
|
96 |
bot1_response, bot2_response = chat_with_bots(user_input, state)
|
97 |
|
|
|
99 |
if "history" not in state:
|
100 |
state["history"] = []
|
101 |
state["history"].extend([
|
|
|
102 |
{"role": "bot1", "content": bot1_response},
|
103 |
{"role": "bot2", "content": bot2_response}
|
104 |
])
|