Hi!
You could use the metrics and display a countdown:
import streamlit as st
import time
st.set_page_config()
ph = st.empty()
N = 5*60
for secs in range(N,0,-1):
mm, ss = secs//60, secs%60
ph.metric("Countdown", f"{mm:02d}:{ss:02d}")
time.sleep(1)
But there is a huge catch: the app wont be able to do anything else until the countdown ends (It stays on the countdown loop). Iโd love to know if thereโs a way to avoid this!