Update utils.py
Browse files
utils.py
CHANGED
|
@@ -23,6 +23,33 @@ def add_bottom_navigation(previous_page, next_page):
|
|
| 23 |
if st.button("Next"):
|
| 24 |
go_to(next_page)
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
# Define pipeline stages
|
| 27 |
pipeline_data = {
|
| 28 |
"Data Collection": {
|
|
|
|
| 23 |
if st.button("Next"):
|
| 24 |
go_to(next_page)
|
| 25 |
|
| 26 |
+
def add_fadein_text(paragraphs):
|
| 27 |
+
# Define CSS fade-in animation
|
| 28 |
+
st.markdown("""
|
| 29 |
+
<style>
|
| 30 |
+
@keyframes fadeIn {
|
| 31 |
+
from {opacity: 0;}
|
| 32 |
+
to {opacity: 1;}
|
| 33 |
+
}
|
| 34 |
+
.fade-in {
|
| 35 |
+
animation: fadeIn 1.5s ease-in forwards;
|
| 36 |
+
opacity: 0;
|
| 37 |
+
margin-bottom: 1em;
|
| 38 |
+
font-size: 24px;
|
| 39 |
+
color: #A6C8FF;
|
| 40 |
+
text-align: left;
|
| 41 |
+
}
|
| 42 |
+
</style>
|
| 43 |
+
""", unsafe_allow_html=True)
|
| 44 |
+
|
| 45 |
+
# Create one placeholder for each paragraph
|
| 46 |
+
placeholders = [st.empty() for _ in paragraphs]
|
| 47 |
+
|
| 48 |
+
# Reveal paragraphs sequentially
|
| 49 |
+
for i, p in enumerate(paragraphs):
|
| 50 |
+
placeholders[i].markdown(f"<div class='fade-in'>{p[0]}</div>", unsafe_allow_html=True)
|
| 51 |
+
time.sleep(p[1]) # delay (seconds) before showing next one
|
| 52 |
+
|
| 53 |
# Define pipeline stages
|
| 54 |
pipeline_data = {
|
| 55 |
"Data Collection": {
|