rairo commited on
Commit
3dc597e
·
verified ·
1 Parent(s): b0649ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -22
app.py CHANGED
@@ -93,35 +93,37 @@ uploaded_file = "Intervention.csv"
93
  df_full = pd.read_csv(uploaded_file) # Load the full data *once*
94
  st.write("Overall Data Visualizations")
95
 
96
- col1_full, col2_full = st.columns([0.9, 0.9])
97
 
98
- with col1_full:
99
- fig_gender_full = px.histogram(df_full, x="Gender", title="Overall Gender Distribution")
100
- fig_gender_full.update_layout(height=350, width=350)
101
- st.plotly_chart(fig_gender_full)
102
 
103
- fig_youth_full = px.histogram(df_full, x="Youth", title="Overall Youth Participation")
104
- fig_youth_full.update_layout(height=350, width=300)
105
- st.plotly_chart(fig_youth_full)
106
 
107
- fig_company_full = px.histogram(df_full, y="Company Name", title="Overall Company Distribution")
108
- fig_company_full.update_layout(height=300, width=300)
109
- st.plotly_chart(fig_company_full)
 
110
 
111
- with col2_full:
112
- fig_category_full = px.histogram(df_full, y="Intervention_Category", title="Overall Intervention Category Distribution")
113
- fig_category_full.update_layout(height=300, width=200)
114
- st.plotly_chart(fig_category_full)
115
 
116
- fig_intervention_full = px.histogram(df_full, y="Intervention", title="Overall Intervention Type Distribution")
117
- fig_intervention_full.update_layout(height=300, width=300)
118
- st.plotly_chart(fig_intervention_full)
119
 
120
- fig_pie_category = px.pie(df_full, names='Intervention_Category', title='Overall Intervention Category Pie Chart')
121
- fig_pie_category.update_layout(height=400, width=500)
122
- st.plotly_chart(fig_pie_category)
 
123
 
124
- if tabs =='Chat':
 
 
 
 
 
 
 
125
  df = pd.read_csv(uploaded_file)
126
  st.subheader("Chat with AI")
127
  st.write("Get visualizations and analysis from our Gemini powered agent")
 
93
  df_full = pd.read_csv(uploaded_file) # Load the full data *once*
94
  st.write("Overall Data Visualizations")
95
 
 
96
 
 
 
 
 
97
 
98
+ if tabs =='Chat':
99
+ col1_full, col2_full = st.columns([0.9, 0.9])
 
100
 
101
+ with col1_full:
102
+ fig_gender_full = px.histogram(df_full, x="Gender", title="Overall Gender Distribution")
103
+ fig_gender_full.update_layout(height=350, width=350)
104
+ st.plotly_chart(fig_gender_full)
105
 
106
+ fig_youth_full = px.histogram(df_full, x="Youth", title="Overall Youth Participation")
107
+ fig_youth_full.update_layout(height=350, width=300)
108
+ st.plotly_chart(fig_youth_full)
 
109
 
110
+ fig_company_full = px.histogram(df_full, y="Company Name", title="Overall Company Distribution")
111
+ fig_company_full.update_layout(height=300, width=300)
112
+ st.plotly_chart(fig_company_full)
113
 
114
+ with col2_full:
115
+ fig_category_full = px.histogram(df_full, y="Intervention_Category", title="Overall Intervention Category Distribution")
116
+ fig_category_full.update_layout(height=300, width=200)
117
+ st.plotly_chart(fig_category_full)
118
 
119
+ fig_intervention_full = px.histogram(df_full, y="Intervention", title="Overall Intervention Type Distribution")
120
+ fig_intervention_full.update_layout(height=300, width=300)
121
+ st.plotly_chart(fig_intervention_full)
122
+
123
+ fig_pie_category = px.pie(df_full, names='Intervention_Category', title='Overall Intervention Category Pie Chart')
124
+ fig_pie_category.update_layout(height=400, width=500)
125
+ st.plotly_chart(fig_pie_category)
126
+
127
  df = pd.read_csv(uploaded_file)
128
  st.subheader("Chat with AI")
129
  st.write("Get visualizations and analysis from our Gemini powered agent")