cetusian commited on
Commit
bc4762e
·
verified ·
1 Parent(s): 1efa837

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -129,10 +129,11 @@ def create_demo():
129
  for model_name, _, _, vote_button, vote_count in response_boxes:
130
  vote_button.click(
131
  lambda votes, name=model_name: handle_votes(votes, name),
132
- inputs=[vote_counts],
133
- outputs=[vote_counts],
134
  )
135
 
 
136
  # Update model visibility when the model selection changes
137
  selected_models.change(
138
  update_model_visibility,
 
129
  for model_name, _, _, vote_button, vote_count in response_boxes:
130
  vote_button.click(
131
  lambda votes, name=model_name: handle_votes(votes, name),
132
+ inputs=[vote_state],
133
+ outputs=[vote_state, vote_count], # Update both the state and the UI element
134
  )
135
 
136
+
137
  # Update model visibility when the model selection changes
138
  selected_models.change(
139
  update_model_visibility,