rairo commited on
Commit
b615f95
·
verified ·
1 Parent(s): 89ae594

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -30
app.py CHANGED
@@ -115,36 +115,31 @@ if tabs == 'Chat':
115
  col1, col2 = st.columns([1, 1]) # Half and half split
116
 
117
  with col1: # Visualizations on the left
118
- st.set_option('deprecation.showPyplotGlobalUse', False) # Suppress warning
119
- row1_col1, row1_col2 = st.columns([1, 1]) # 2 visualizations per row
120
- with row1_col1:
121
- fig_gender = px.histogram(df, x="Gender", title="Gender Distribution")
122
- fig_gender.update_layout(height=400, width=None) # Responsive width
123
- st.plotly_chart(fig_gender)
124
- with row1_col2:
125
- fig_youth = px.histogram(df, x="Youth", title="Youth Participation")
126
- fig_youth.update_layout(height=400, width=None) # Responsive width
127
- st.plotly_chart(fig_youth)
128
-
129
- row2_col1, row2_col2 = st.columns([1, 1])
130
- with row2_col1:
131
- fig_company = px.histogram(df, y="Company Name", title="Company Distribution")
132
- fig_company.update_layout(height=400, width=None) # Responsive width
133
- st.plotly_chart(fig_company)
134
- with row2_col2:
135
- fig_category = px.histogram(df, y="Intervention_Category", title="Intervention Category Distribution")
136
- fig_category.update_layout(height=400, width=None) # Responsive width
137
- st.plotly_chart(fig_category)
138
-
139
- row3_col1, row3_col2 = st.columns([1, 1])
140
- with row3_col1:
141
- fig_intervention = px.histogram(df, y="Intervention", title="Intervention Type Distribution")
142
- fig_intervention.update_layout(height=400, width=None) # Responsive width
143
- st.plotly_chart(fig_intervention)
144
- with row3_col2:
145
- fig_pie_category = px.pie(df, names='Intervention_Category', title='Intervention Category Pie Chart')
146
- fig_pie_category.update_layout(height=400, width=None) # Responsive width
147
- st.plotly_chart(fig_pie_category)
148
 
149
 
150
  with col2: # Chat on the right
 
115
  col1, col2 = st.columns([1, 1]) # Half and half split
116
 
117
  with col1: # Visualizations on the left
118
+ st.set_option('deprecation.showPyplotGlobalUse', False) # Suppress warning
119
+
120
+ fig_gender = px.histogram(df, x="Gender", title="Gender Distribution")
121
+ fig_gender.update_layout(height=400, width=None) # Responsive width
122
+ st.plotly_chart(fig_gender)
123
+
124
+ fig_youth = px.histogram(df, x="Youth", title="Youth Participation")
125
+ fig_youth.update_layout(height=400, width=None) # Responsive width
126
+ st.plotly_chart(fig_youth)
127
+
128
+ fig_company = px.histogram(df, y="Company Name", title="Company Distribution")
129
+ fig_company.update_layout(height=400, width=None) # Responsive width
130
+ st.plotly_chart(fig_company)
131
+
132
+ fig_category = px.histogram(df, y="Intervention_Category", title="Intervention Category Distribution")
133
+ fig_category.update_layout(height=400, width=None) # Responsive width
134
+ st.plotly_chart(fig_category)
135
+
136
+ fig_intervention = px.histogram(df, y="Intervention", title="Intervention Type Distribution")
137
+ fig_intervention.update_layout(height=400, width=None) # Responsive width
138
+ st.plotly_chart(fig_intervention)
139
+
140
+ fig_pie_category = px.pie(df, names='Intervention_Category', title='Intervention Category Pie Chart')
141
+ fig_pie_category.update_layout(height=400, width=None) # Responsive width
142
+ st.plotly_chart(fig_pie_category)
 
 
 
 
 
143
 
144
 
145
  with col2: # Chat on the right