rairo commited on
Commit
44b878d
·
verified ·
1 Parent(s): 8094bf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -5
app.py CHANGED
@@ -81,16 +81,40 @@ def generateResponse(dataFrame,prompt):
81
  st.write("# Intervention Analytics")
82
  st.markdown('<style>' + open('./style.css').read() + '</style>', unsafe_allow_html=True)
83
  st.write("##### Get analysis and engage in insightful conversations with your data through our powerful AI")
 
84
  with st.sidebar:
85
  st.title("Intervention Analytics")
86
  st.sidebar.image("logoqb.jpeg", use_column_width=True)
87
- tabs = on_hover_tabs(tabName=['Reports', 'Chat'],
88
- iconName=['dashboard', 'chat'], default_choice=0)
89
-
90
-
91
 
92
  uploaded_file = "Intervention.csv"
93
- #uploaded_file = "healthcare_dataset.csv"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
 
96
  if tabs == 'Reports':
 
81
  st.write("# Intervention Analytics")
82
  st.markdown('<style>' + open('./style.css').read() + '</style>', unsafe_allow_html=True)
83
  st.write("##### Get analysis and engage in insightful conversations with your data through our powerful AI")
84
+
85
  with st.sidebar:
86
  st.title("Intervention Analytics")
87
  st.sidebar.image("logoqb.jpeg", use_column_width=True)
88
+ tabs = on_hover_tabs(tabName=['Reports', 'Chat'], iconName=['dashboard', 'chat'], default_choice=0)
 
 
 
89
 
90
  uploaded_file = "Intervention.csv"
91
+
92
+ # --- Visualizations of the whole data ---
93
+ df_full = pd.read_csv(uploaded_file) # Load the full data *once*
94
+ st.subheader("Overall Data Visualizations")
95
+
96
+ col1_full, col2_full = st.columns(2)
97
+
98
+ with col1_full:
99
+ fig_gender_full = px.histogram(df_full, x="Gender", title="Overall Gender Distribution")
100
+ st.plotly_chart(fig_gender_full)
101
+
102
+ fig_youth_full = px.histogram(df_full, x="Youth", title="Overall Youth Participation")
103
+ st.plotly_chart(fig_youth_full)
104
+
105
+ fig_company_full = px.histogram(df_full, x="Company Name", title="Overall Company Distribution")
106
+ st.plotly_chart(fig_company_full)
107
+
108
+ with col2_full:
109
+ fig_category_full = px.histogram(df_full, x="Intervention_Category", title="Overall Intervention Category Distribution")
110
+ st.plotly_chart(fig_category_full)
111
+
112
+ fig_intervention_full = px.histogram(df_full, x="Intervention", title="Overall Intervention Type Distribution")
113
+ st.plotly_chart(fig_intervention_full)
114
+
115
+ fig_pie_category = px.pie(df_full, names='Intervention_Category', title='Overall Intervention Category Pie Chart')
116
+ st.plotly_chart(fig_pie_category)
117
+
118
 
119
 
120
  if tabs == 'Reports':