Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,16 +58,15 @@ def clear_chat(state):
|
|
58 |
# Initialize the collection object
|
59 |
collection = init_database()
|
60 |
|
61 |
-
# Get the list of
|
62 |
-
|
63 |
|
64 |
-
# Randomly select two new
|
65 |
-
|
66 |
-
state['last_bots'] =
|
67 |
|
68 |
# Reset other components
|
69 |
return state, [], [], gr.Button.update(interactive=False), gr.Button.update(interactive=False), gr.Textbox.update(value='', interactive=True), gr.Button.update(interactive=True)
|
70 |
-
global_elo_ratings=None
|
71 |
|
72 |
from datasets import load_dataset,DatasetDict,Dataset
|
73 |
import requests
|
|
|
58 |
# Initialize the collection object
|
59 |
collection = init_database()
|
60 |
|
61 |
+
# Get the list of adapter names
|
62 |
+
adapter_names = [entry['adapter'] for entry in chatbots_data]
|
63 |
|
64 |
+
# Randomly select two new adapters
|
65 |
+
selected_adapters = random.sample(adapter_names, 2)
|
66 |
+
state['last_bots'] = selected_adapters
|
67 |
|
68 |
# Reset other components
|
69 |
return state, [], [], gr.Button.update(interactive=False), gr.Button.update(interactive=False), gr.Textbox.update(value='', interactive=True), gr.Button.update(interactive=True)
|
|
|
70 |
|
71 |
from datasets import load_dataset,DatasetDict,Dataset
|
72 |
import requests
|