m-ric HF Staff commited on
Commit
fbdd411
·
1 Parent(s): 58a7eda

Change button to checkbox

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -600,10 +600,10 @@ _If you do not consent to this collection, you can untick a box in the sidebar t
600
 
601
  minimalist_toggle = gr.Checkbox(label="Innie/Outie", value=False)
602
 
603
- def add_items(session_state):
604
  session_state["consent_storage"] = not session_state["consent_storage"]
605
 
606
- gr.Button("Store task and agent trace?").click(add_items, session_state)
607
 
608
  def apply_theme(minimalist_mode: bool):
609
  if not minimalist_mode:
 
600
 
601
  minimalist_toggle = gr.Checkbox(label="Innie/Outie", value=False)
602
 
603
+ def change_consent(session_state):
604
  session_state["consent_storage"] = not session_state["consent_storage"]
605
 
606
+ gr.Checkbox("Store task and agent trace?").change(change_consent, inputs=session_state)
607
 
608
  def apply_theme(minimalist_mode: bool):
609
  if not minimalist_mode: