Claude Claude commited on
Commit
af32d69
Β·
unverified Β·
1 Parent(s): e7dd723

Fix persona IDs to match database and collapse diagnostics

Browse files

CRITICAL FIX: The population network was only using 1 persona because the
persona IDs in the weight sliders didn't match the actual database IDs.

Fixed persona ID mappings:
- jennifer_roberts β†’ james_obrien βœ“
- david_park β†’ david_kim βœ“
- raj_patel β†’ priya_patel βœ“

Other fixes:
- Changed System Diagnostics expander to start collapsed (expanded=False)
- Updated display names to match actual personas

This should now correctly distribute the population across all selected personas.

Files modified:
- pages/3_🌐_Opinion_Equilibria.py: Fixed persona IDs and names
- web_app.py: Collapsed diagnostics by default

πŸ€– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

pages/3_🌐_Opinion_Equilibria.py CHANGED
@@ -151,10 +151,10 @@ else:
151
  personas_list = [
152
  ("sarah_chen", "🌱 Sarah Chen"),
153
  ("marcus_thompson", "πŸͺ Marcus Thompson"),
154
- ("jennifer_roberts", "πŸ‘¨β€πŸ‘©β€πŸ‘§ Jennifer Roberts"),
155
- ("david_park", "πŸ—οΈ David Park"),
156
- ("elena_rodriguez", "🚲 Elena Rodriguez"),
157
- ("raj_patel", "πŸŽ“ Raj Patel"),
158
  ]
159
 
160
  for pid, name in personas_list:
 
151
  personas_list = [
152
  ("sarah_chen", "🌱 Sarah Chen"),
153
  ("marcus_thompson", "πŸͺ Marcus Thompson"),
154
+ ("james_obrien", "πŸ‘΄ James O'Brien"),
155
+ ("david_kim", "πŸ—οΈ David Kim"),
156
+ ("elena_rodriguez", "🚲 Dr. Elena Rodriguez"),
157
+ ("priya_patel", "🏘️ Priya Patel"),
158
  ]
159
 
160
  for pid, name in personas_list:
web_app.py CHANGED
@@ -115,8 +115,8 @@ initialization_error = None # Store any error that occurs
115
  with st.sidebar:
116
  st.title("πŸ€– LLM Model")
117
 
118
- # Diagnostics (always expanded for now to help debug)
119
- with st.expander("πŸ” System Diagnostics", expanded=True):
120
  api_key = os.getenv("ANTHROPIC_API_KEY")
121
  st.write(f"**API Key Status:** {'βœ“ Found' if api_key else 'βœ— Missing'}")
122
  if api_key:
 
115
  with st.sidebar:
116
  st.title("πŸ€– LLM Model")
117
 
118
+ # Diagnostics (collapsed by default)
119
+ with st.expander("πŸ” System Diagnostics", expanded=False):
120
  api_key = os.getenv("ANTHROPIC_API_KEY")
121
  st.write(f"**API Key Status:** {'βœ“ Found' if api_key else 'βœ— Missing'}")
122
  if api_key: