Hasitha16 commited on
Commit
63a3c84
·
verified ·
1 Parent(s): 8d2ee16

Update frontend.py

Browse files
Files changed (1) hide show
  1. frontend.py +4 -4
frontend.py CHANGED
@@ -158,10 +158,10 @@ with tab1:
158
  "product": data.get("product_category", "General"),
159
  "churn_risk": data.get("churn_risk", "Unknown"),
160
  "session_id": str(uuid.uuid4())
161
- })
162
- # Keep log lightweight
163
- if len(st.session_state.churn_log) > 1000:
164
- st.session_state.churn_log = st.session_state.churn_log[-1000:]
165
  except Exception as e:
166
  st.warning(f"🧪 Logging failed: {e}")
167
 
 
158
  "product": data.get("product_category", "General"),
159
  "churn_risk": data.get("churn_risk", "Unknown"),
160
  "session_id": str(uuid.uuid4())
161
+ })
162
+ # Keep log lightweight
163
+ if len(st.session_state.churn_log) > 1000:
164
+ st.session_state.churn_log = st.session_state.churn_log[-1000:]
165
  except Exception as e:
166
  st.warning(f"🧪 Logging failed: {e}")
167