saherPervaiz commited on
Commit
67c4e86
·
verified ·
1 Parent(s): 3b208ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -18
app.py CHANGED
@@ -77,25 +77,24 @@ if uploaded_file is not None:
77
  mime="text/csv"
78
  )
79
 
80
- # Correlation Heatmap
81
- st.subheader("Correlation Heatmap")
82
- st.write("Visualizing correlations between numeric features...")
83
- heatmap_plot = plot_correlation_heatmap(df_cleaned)
84
- st.pyplot(heatmap_plot)
85
-
86
- # Save and download heatmap as PNG
87
- heatmap_buffer = io.BytesIO()
88
- fig = plt.gcf() # Get the current figure
89
- fig.savefig(heatmap_buffer, format="png") # Save the figure to the buffer
90
- heatmap_buffer.seek(0)
91
-
92
- st.download_button(
93
- label="Download Correlation Heatmap (PNG)",
94
- data=heatmap_buffer,
95
- file_name="correlation_heatmap.png",
96
- mime="image/png"
97
- )
98
 
 
 
 
 
 
 
99
 
100
  # Additional Visualizations
101
  st.subheader("Additional Visualizations")
 
77
  mime="text/csv"
78
  )
79
 
80
+ # Correlation Heatmap
81
+ st.subheader("Correlation Heatmap")
82
+ st.write("Visualizing correlations between numeric features...")
83
+ heatmap_plot = plot_correlation_heatmap(df_cleaned)
84
+ st.pyplot(heatmap_plot)
85
+
86
+ # Save and download heatmap as PNG
87
+ heatmap_buffer = io.BytesIO()
88
+ fig = plt.gcf() # Get the current figure
89
+ fig.savefig(heatmap_buffer, format="png") # Save the figure to the buffer
90
+ heatmap_buffer.seek(0)
 
 
 
 
 
 
 
91
 
92
+ st.download_button(
93
+ label="Download Correlation Heatmap (PNG)",
94
+ data=heatmap_buffer,
95
+ file_name="correlation_heatmap.png",
96
+ mime="image/png"
97
+ )
98
 
99
  # Additional Visualizations
100
  st.subheader("Additional Visualizations")