Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,11 +36,11 @@ def update_data(df):
|
|
36 |
return df
|
37 |
|
38 |
# Create a placeholder for the plot
|
39 |
-
|
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 |
-
|
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
|