Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -160,10 +160,10 @@ if st.session_state.df is not None:
|
|
| 160 |
verbose=True,
|
| 161 |
)
|
| 162 |
|
| 163 |
-
#
|
| 164 |
tab1, tab2 = st.tabs(["π Query Insights + Viz", "π Full Data Viz"])
|
| 165 |
|
| 166 |
-
# Tab 1: Query
|
| 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 |
-
#
|
| 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 |
-
#
|
| 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")
|