prakharg24 commited on
Commit
b29f0e3
·
verified ·
1 Parent(s): df1a6a6

Update my_pages/ica.py

Browse files
Files changed (1) hide show
  1. my_pages/ica.py +4 -4
my_pages/ica.py CHANGED
@@ -84,16 +84,16 @@ def render():
84
 
85
  # --- Capture Click Events ---
86
  selected = plotly_events(fig, click_event=True, hover_event=False, select_event=False)
87
-
88
  if selected:
89
- # Ternary coords returned as a,b,c
90
- point = selected[0]["pointData"]
91
  st.session_state.weights = {
92
  "Intentional": round(point["a"], 4),
93
  "Conventional": round(point["b"], 4),
94
  "Arbitrary": round(point["c"], 4)
95
  }
96
- w = st.session_state.weights
97
 
98
  # --- Torch highlighting logic ---
99
  explanations = []
 
84
 
85
  # --- Capture Click Events ---
86
  selected = plotly_events(fig, click_event=True, hover_event=False, select_event=False)
87
+
88
  if selected:
89
+ # Directly use a,b,c from event dict
90
+ point = selected[0]
91
  st.session_state.weights = {
92
  "Intentional": round(point["a"], 4),
93
  "Conventional": round(point["b"], 4),
94
  "Arbitrary": round(point["c"], 4)
95
  }
96
+ st.experimental_rerun()
97
 
98
  # --- Torch highlighting logic ---
99
  explanations = []