Ashar086 commited on
Commit
301fa17
·
verified ·
1 Parent(s): 2d179e0

Create components/animation_engineer.py

Browse files
Files changed (1) hide show
  1. components/animation_engineer.py +16 -0
components/animation_engineer.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class AnimationEngineer:
2
+ def display_care_plan_animation(self, final_plan):
3
+ st.write("Visualizing Care Plan...")
4
+ progress_bar = st.progress(0)
5
+ status_text = st.empty()
6
+
7
+ steps = final_plan.split(", ")
8
+ for i, step in enumerate(steps):
9
+ status_text.text(f"Step {i+1}/{len(steps)}: {step}")
10
+ for percent_complete in range(0, 101, 10):
11
+ time.sleep(0.1) # Simulate some work being done
12
+ progress_bar.progress(percent_complete)
13
+ time.sleep(0.5) # Pause between steps
14
+
15
+ status_text.text("Care Plan Visualization Complete!")
16
+ st.balloons()