Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +5 -0
src/streamlit_app.py
CHANGED
|
@@ -209,6 +209,10 @@ with tab1:
|
|
| 209 |
st.subheader("Candidate Card", divider="green")
|
| 210 |
fig_treemap = px.treemap(df, path=[px.Constant("all"), 'category', 'label', 'text'], values='score', color='category')
|
| 211 |
fig_treemap.update_layout(margin=dict(t=50, l=25, r=25, b=25), paper_bgcolor='#F5FFFA', plot_bgcolor='#F5FFFA')
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
st.plotly_chart(fig_treemap)
|
| 213 |
col1, col2 = st.columns(2)
|
| 214 |
with col1:
|
|
@@ -248,6 +252,7 @@ with tab1:
|
|
| 248 |
buf = io.BytesIO()
|
| 249 |
with zipfile.ZipFile(buf, "w") as myzip:
|
| 250 |
myzip.writestr("Summary of the results.csv", df.to_csv(index=False))
|
|
|
|
| 251 |
myzip.writestr("Glossary of tags.csv", dfa.to_csv(index=False))
|
| 252 |
st.download_button(
|
| 253 |
label="Download results and glossary (zip)",
|
|
|
|
| 209 |
st.subheader("Candidate Card", divider="green")
|
| 210 |
fig_treemap = px.treemap(df, path=[px.Constant("all"), 'category', 'label', 'text'], values='score', color='category')
|
| 211 |
fig_treemap.update_layout(margin=dict(t=50, l=25, r=25, b=25), paper_bgcolor='#F5FFFA', plot_bgcolor='#F5FFFA')
|
| 212 |
+
expander = st.expander("**Download**")
|
| 213 |
+
expander.write("""
|
| 214 |
+
You can easily download the tree map by hovering over it. Look for the download icon that appears in the top right corner.
|
| 215 |
+
""")
|
| 216 |
st.plotly_chart(fig_treemap)
|
| 217 |
col1, col2 = st.columns(2)
|
| 218 |
with col1:
|
|
|
|
| 252 |
buf = io.BytesIO()
|
| 253 |
with zipfile.ZipFile(buf, "w") as myzip:
|
| 254 |
myzip.writestr("Summary of the results.csv", df.to_csv(index=False))
|
| 255 |
+
myzip.writestr("Most Frequent Entities.csv", repeating_entities.to_csv(index=False))
|
| 256 |
myzip.writestr("Glossary of tags.csv", dfa.to_csv(index=False))
|
| 257 |
st.download_button(
|
| 258 |
label="Download results and glossary (zip)",
|