rwitz commited on
Commit
6c2a23d
·
verified ·
1 Parent(s): 40c75e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -50,7 +50,10 @@ def clear_chat(state):
50
 
51
  # Shuffle and reinitialize chatbots in the state
52
  random.shuffle(bot_names)
53
- state['last_bots'] = [bot_names[0], bot_names[1]]
 
 
 
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)
 
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)