Dear all,
My problem is when I initialize a new variable called self.items = 0, I would like to increase by 1 every time I imported value completely. But I try to debug with that variable, but it was always set by 0 as initialize
Here is my sample code:
import streamlit as st
class main:
def __init__(self):
self.items = 0
self.run()
def run(self):
st.title('Home')
print(self.items)
if st.button('Submit'):
self.items = self.items + 1
print(self.items)
if __name__ == "__main__":
main()