rwitz commited on
Commit
c5494d3
1 Parent(s): cbc3047

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -205,10 +205,15 @@ def refresh_leaderboard():
205
  collection = init_database()
206
  return generate_leaderboard(collection)
207
  async def direct_chat(model, user_input, chatbot):
208
- response = await get_bot_response(model, user_input, None, 0)
 
 
 
 
 
 
209
  chatbot.append((user_input, response))
210
  return "", chatbot
211
-
212
  # ...
213
  refresh_leaderboard()
214
  # Gradio interface setup
 
205
  collection = init_database()
206
  return generate_leaderboard(collection)
207
  async def direct_chat(model, user_input, chatbot):
208
+ temp_state = {
209
+ "history": [
210
+ [{"role": "user", "content": user_input}],
211
+ [{"role": "user", "content": user_input}]
212
+ ]
213
+ }
214
+ response = await get_bot_response(model, user_input, temp_state, 0)
215
  chatbot.append((user_input, response))
216
  return "", chatbot
 
217
  # ...
218
  refresh_leaderboard()
219
  # Gradio interface setup