Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|