awacke1 commited on
Commit
a353a48
·
1 Parent(s): 3f2b322

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,11 +36,11 @@ def update_data(df):
36
  return df
37
 
38
  # Create a placeholder for the plot
39
- plot_placeholder = st.empty()
40
 
41
  # Loop to animate
42
  for i in range(10): # Loop for 10 iterations
43
  df = update_data(df)
44
  fig = create_sunburst_plot(df)
45
- plot_placeholder.plotly_chart(fig)
46
  time.sleep(1) # Sleep for 1 second
 
36
  return df
37
 
38
  # Create a placeholder for the plot
39
+ # animate the chart by incrementing the cost values and updating the chart every second. You can adjust the update_data function to customize the variations in the data.
40
 
41
  # Loop to animate
42
  for i in range(10): # Loop for 10 iterations
43
  df = update_data(df)
44
  fig = create_sunburst_plot(df)
45
+ st.plotly_chart(fig)
46
  time.sleep(1) # Sleep for 1 second