Heatmap not giving values

Hi,

When After deploying the app I am not getting the value. But the same code is working fine in local.

CODE :-
import streamlit as st
import pandas as pd
import plotly.express as px
import seaborn as sns
import matplotlib.pyplot as plt
selected_metrics = [“ABC”]
selected_metrics = [metric for metric in selected_metrics if metric != “Type”]
correlation_matrix = filtered_df[selected_metrics].corr()
plt.figure(figsize=(20, 12))
sns.heatmap(correlation_matrix, annot=True, cmap=“coolwarm”, fmt=“.2f”, linewidths=0.5)
st.set_option(‘deprecation.showPyplotGlobalUse’, False)
st.pyplot()

1 Like

Thank you for your question @Ritushree_Pagare! :raised_hands:

It’s difficult to say, but if it works on your local machine, then there might be version discrepancies between your local environment and the deployment environment.

Have you ensured that you’re using the same versions of the libraries in both places?

You can pin specific versions in your requirements.txt file, for example:

pandas==1.3.2
plotly==5.3.1
matplotlib==3.4.3

Hopefully, that will do the trick. Let us know!

Best,
Charly

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.