Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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=[
|
133 |
-
outputs=[
|
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,
|