cryogenic22 commited on
Commit
0c965b4
·
verified ·
1 Parent(s): 6e1efa8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -81,12 +81,16 @@ def main():
81
  st.session_state.chat_history.extend(results)
82
 
83
  # Display analyses
84
- for idx, result in enumerate(results):
85
- analysis_type = result.get('analysis_type', 'Individual')
86
- if analysis_type != 'Individual':
87
- st.subheader(f"{analysis_type} Results")
88
- else:
89
- st.subheader(f"Analysis Results - Chart {idx + 1}")
 
 
 
 
90
  st.write(result['analysis'])
91
 
92
  # Risk warning
 
81
  st.session_state.chat_history.extend(results)
82
 
83
  # Display analyses
84
+ # First show comparative analysis if it exists
85
+ for result in results:
86
+ if result.get('analysis_type') != 'Individual':
87
+ st.subheader(f"{result['analysis_type']} Results")
88
+ st.write(result['analysis'])
89
+
90
+ # Then show individual analyses
91
+ individual_analyses = [r for r in results if r.get('analysis_type') == 'Individual']
92
+ for idx, result in enumerate(individual_analyses):
93
+ st.subheader(f"Analysis Results - Chart {idx + 1}")
94
  st.write(result['analysis'])
95
 
96
  # Risk warning