Update my_pages/ica.py
Browse files- 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 |
-
#
|
| 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 |
-
|
| 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 = []
|