Spaces:
Sleeping
Sleeping
Claude
Claude
commited on
Fix persona IDs to match database and collapse diagnostics
Browse filesCRITICAL 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 +4 -4
- web_app.py +2 -2
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 |
-
("
|
| 155 |
-
("
|
| 156 |
-
("elena_rodriguez", "π² Elena Rodriguez"),
|
| 157 |
-
("
|
| 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 (
|
| 119 |
-
with st.expander("π System Diagnostics", expanded=
|
| 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:
|