-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstreamlit_app.py
More file actions
34 lines (24 loc) · 866 Bytes
/
streamlit_app.py
File metadata and controls
34 lines (24 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import streamlit as st
from myfuncs import *
### DECLARATIONS ###
MAX_DAYS=30
COMPLETED=daylist(MAX_DAYS)[:16] # Update till completion
SPECIAL=set(['Day 3', 'Day 5', 'Day 8', 'Day 9', 'Day 10', 'Day 11', 'Day 12', 'Day 14', 'Day 15', 'Day 16']) # Update till completion
### HEADER ###
st.title("30 Days of Streamlit")
st.write("Check my progress below!")
st.progress(calc_prog(len(COMPLETED), MAX_DAYS))
st.sidebar.header("Navigate through the journey!")
day = st.sidebar.selectbox("Which day do you wish to visit?", daylist(MAX_DAYS))
### CONTENT ###
if day in COMPLETED:
intro(day, isDone=True)
try:
data = read_RM_data('./README.md', day)
except Exception as exp:
print(exp.args[0])
st.markdown(data) # Can display rogue HTML tags
if day in SPECIAL:
call_special(day)
else:
intro()