Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -821,6 +821,14 @@ elif selected_menu_option == "Clustering":
|
|
821 |
hide_index=True,
|
822 |
)
|
823 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
824 |
st.markdown("### Cluster Plot")
|
825 |
# Plot the scatter plot in plotly with the cluster labels as colors reduce further to 2 dimensions if n_components > 2
|
826 |
if n_components > 2:
|
|
|
821 |
hide_index=True,
|
822 |
)
|
823 |
|
824 |
+
st.download_button(
|
825 |
+
"Download dataset with labels",
|
826 |
+
df_clustered.to_csv(index=False).encode('utf-8'),
|
827 |
+
f'ditaduranuncamais_{datetime.now().strftime("%Y%m%d-%H%M%S")}.csv',
|
828 |
+
"text/csv",
|
829 |
+
key='download-csv'
|
830 |
+
)
|
831 |
+
|
832 |
st.markdown("### Cluster Plot")
|
833 |
# Plot the scatter plot in plotly with the cluster labels as colors reduce further to 2 dimensions if n_components > 2
|
834 |
if n_components > 2:
|