Skip to content

Instantly share code, notes, and snippets.

@danlester
Created July 6, 2020 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danlester/531523cbff43144d6a5d5a5e292d9394 to your computer and use it in GitHub Desktop.
Save danlester/531523cbff43144d6a5d5a5e292d9394 to your computer and use it in GitHub Desktop.
import streamlit as st
@st.cache
def get_start_time():
from datetime import datetime
return datetime.now()
start_time = get_start_time()
st.write(start_time)
count = 0
if st.button('Increment'):
count += 1
st.write('Clicked! Start Time {}; Count {}'.format(start_time, count))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment