Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,16 @@ TEMP_FILE = "current_selections.csv" # Temporary file to store current selectio
|
|
13 |
hf_token = st.secrets["HF_TOKEN"] # Use the token stored in the secrets manager
|
14 |
api = HfApi()
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
# Load temporary selections from the shared file
|
17 |
def load_current_selections():
|
18 |
if os.path.exists(TEMP_FILE):
|
|
|
13 |
hf_token = st.secrets["HF_TOKEN"] # Use the token stored in the secrets manager
|
14 |
api = HfApi()
|
15 |
|
16 |
+
# Initialize all required session state variables
|
17 |
+
if "users" not in st.session_state:
|
18 |
+
st.session_state.users = [] # List to hold users
|
19 |
+
if "current_selections" not in st.session_state:
|
20 |
+
st.session_state.current_selections = [] # List to hold current selections
|
21 |
+
if "step" not in st.session_state:
|
22 |
+
st.session_state.step = 1 # Step for navigation
|
23 |
+
if "history" not in st.session_state:
|
24 |
+
st.session_state.history = [] # List to hold history data
|
25 |
+
|
26 |
# Load temporary selections from the shared file
|
27 |
def load_current_selections():
|
28 |
if os.path.exists(TEMP_FILE):
|