Spaces:
Build error
Build error
Update app.py
Browse files6 unmodified lines7891011121314151627 unmodified lines44454647484950515253541 unmodified line565758596061626 unmodified linesimport dash_bootstrap_components as dbc# Load CSV into DataFramedf = pd.read_csv('dashboard18.csv')# List of unique farm names for the dropdownfarm_names = df['مزرعه'].unique()# Initialize the Dash appapp = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])27 unmodified linesreturn go.Figure(), "Please select a farm."# Filter data based on selected farmfiltered_df = df[df['Farm Name'] == selected_farm]# Prepare 3D surface dataweeks = np.arange(1, 19)heights = filtered_df.iloc[:, 1:19].values # Adjust for your actual data structurefig = make_subplots(rows=1, cols=1, specs=[[{'type': 'surface'}]])1 unmodified linego.Surface(z=heights,x=weeks,y=filtered_df['Farm Name'].values,colorscale='Viridis'))6 unmodified lines7891011121314151627 unmodified lines44454647484950515253541 unmodified line565758596061626 unmodified linesimport dash_bootstrap_components as dbc# Load CSV into DataFramedf = pd.read_csv('/mnt/data/dashboard18.csv')# List of unique farm names for the dropdownfarm_names = df[' مزرعه '].unique()# Initialize the Dash appapp = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])27 unmodified linesreturn go.Figure(), "Please select a farm."# Filter data based on selected farmfiltered_df = df[df[' مزرعه '] == selected_farm]# Prepare 3D surface dataweeks = np.arange(1, 19)heights = filtered_df.iloc[:, 6:24].values # Adjusted to match height columnsfig = make_subplots(rows=1, cols=1, specs=[[{'type': 'surface'}]])1 unmodified linego.Surface(z=heights,x=weeks,y=filtered_df[' مزرعه '].values,colorscale='Viridis'))
app.py+5-5