DrishtiSharma commited on
Commit
333c72e
Β·
verified Β·
1 Parent(s): 6925732

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -160,10 +160,10 @@ if st.session_state.df is not None:
160
  verbose=True,
161
  )
162
 
163
- # UI: Tabs for Query Results and General Insights
164
  tab1, tab2 = st.tabs(["πŸ” Query Insights + Viz", "πŸ“Š Full Data Viz"])
165
 
166
- # Tab 1: Query Insights + Visualization
167
  with tab1:
168
  query = st.text_area("Enter Query:", value="Provide insights into the salary of a Principal Data Scientist.")
169
  if st.button("Submit Query"):
@@ -212,12 +212,12 @@ if st.session_state.df is not None:
212
  )
213
  st.plotly_chart(fig2)
214
 
215
- # New Visualization: Salary by Employment Type
216
  fig3 = px.box(st.session_state.df, x="employment_type", y="salary_in_usd",
217
  title="Salary Distribution by Employment Type")
218
  st.plotly_chart(fig3)
219
 
220
- # New Visualization: Salary by Company Size (if available)
221
  if "company_size" in st.session_state.df.columns:
222
  fig4 = px.box(st.session_state.df, x="company_size", y="salary_in_usd",
223
  title="Salary Distribution by Company Size")
 
160
  verbose=True,
161
  )
162
 
163
+ # Tabs for Query Results and General Insights
164
  tab1, tab2 = st.tabs(["πŸ” Query Insights + Viz", "πŸ“Š Full Data Viz"])
165
 
166
+ # Tab 1: Query-Insights + Visualization
167
  with tab1:
168
  query = st.text_area("Enter Query:", value="Provide insights into the salary of a Principal Data Scientist.")
169
  if st.button("Submit Query"):
 
212
  )
213
  st.plotly_chart(fig2)
214
 
215
+ # Salary by Employment Type
216
  fig3 = px.box(st.session_state.df, x="employment_type", y="salary_in_usd",
217
  title="Salary Distribution by Employment Type")
218
  st.plotly_chart(fig3)
219
 
220
+ # Salary by Company Size (if available)
221
  if "company_size" in st.session_state.df.columns:
222
  fig4 = px.box(st.session_state.df, x="company_size", y="salary_in_usd",
223
  title="Salary Distribution by Company Size")