rwitz commited on
Commit
f996878
·
verified ·
1 Parent(s): 702d9d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -48,16 +48,13 @@ def clear_chat(state):
48
  # Get the list of chatbot names
49
  bot_names = list(get_user_elo_ratings(collection).keys())
50
 
51
- # Shuffle and reinitialize chatbots in the state
52
- random.shuffle(bot_names)
53
- try:
54
- state['last_bots'] = [bot_names[0], bot_names[1]]
55
- except:
56
- 1==1
57
 
58
  # Reset other components
59
  return state, [], [], gr.Button.update(interactive=False), gr.Button.update(interactive=False), gr.Textbox.update(value='', interactive=True), gr.Button.update(interactive=True)
60
- global_elo_ratings=None
61
 
62
  from datasets import load_dataset,DatasetDict,Dataset
63
  import requests
 
48
  # Get the list of chatbot names
49
  bot_names = list(get_user_elo_ratings(collection).keys())
50
 
51
+ # Randomly select two new Loras
52
+ selected_bots = random.sample(bot_names, 2)
53
+ state['last_bots'] = selected_bots
 
 
 
54
 
55
  # Reset other components
56
  return state, [], [], gr.Button.update(interactive=False), gr.Button.update(interactive=False), gr.Textbox.update(value='', interactive=True), gr.Button.update(interactive=True)
57
+ global_elo_ratings=None
58
 
59
  from datasets import load_dataset,DatasetDict,Dataset
60
  import requests