counting / streamlit_app.py
nonstopiodemo's picture
Upload folder using huggingface_hub
e9d36eb verified
raw
history blame contribute delete
307 Bytes
import streamlit as st
# Initialize a counter variable
if 'counter' not in st.session_state:
st.session_state.counter = 0
# Display the current count
st.write("Number of clicks:", st.session_state.counter)
# Button to increment the counter
if st.button("Click me!"):
st.session_state.counter += 1