Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -223,7 +223,7 @@ footer {
|
|
223 |
|
224 |
def update_button_states(selected_position):
|
225 |
return [
|
226 |
-
gr.
|
227 |
for pos in position_list
|
228 |
]
|
229 |
|
@@ -259,7 +259,7 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as Kolors:
|
|
259 |
position_buttons = [gr.Button("•") for _ in range(25)]
|
260 |
|
261 |
for btn, pos in zip(position_buttons, position_list):
|
262 |
-
btn.click(lambda
|
263 |
btn.click(update_button_states, inputs=[text_position], outputs=position_buttons)
|
264 |
|
265 |
with gr.Column():
|
@@ -339,4 +339,4 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as Kolors:
|
|
339 |
# Set initial button states
|
340 |
Kolors.load(update_button_states, inputs=[text_position], outputs=position_buttons)
|
341 |
|
342 |
-
Kolors.queue().launch(debug=True
|
|
|
223 |
|
224 |
def update_button_states(selected_position):
|
225 |
return [
|
226 |
+
gr.update(variant="primary") if pos == selected_position else gr.update(variant="secondary")
|
227 |
for pos in position_list
|
228 |
]
|
229 |
|
|
|
259 |
position_buttons = [gr.Button("•") for _ in range(25)]
|
260 |
|
261 |
for btn, pos in zip(position_buttons, position_list):
|
262 |
+
btn.click(lambda p=pos: p, outputs=text_position)
|
263 |
btn.click(update_button_states, inputs=[text_position], outputs=position_buttons)
|
264 |
|
265 |
with gr.Column():
|
|
|
339 |
# Set initial button states
|
340 |
Kolors.load(update_button_states, inputs=[text_position], outputs=position_buttons)
|
341 |
|
342 |
+
Kolors.queue().launch(debug=True)
|