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