OzoneAsai commited on
Commit
4267a5a
·
1 Parent(s): f9ae281

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -13
app.py CHANGED
@@ -19,20 +19,10 @@ if "page" not in st.session_state:
19
  if "blur_option" not in st.session_state:
20
  st.session_state.blur_option = True
21
 
22
- # Create a new checkbox only if it doesn't exist
23
- if "blur_option_checkbox" not in st.session_state:
24
- st.session_state.blur_option_checkbox = st.checkbox("NSFW画像にBlurをかける", key="blur_option", value=st.session_state.blur_option)
25
 
26
-
27
- # Recreate the checkbox when its value needs to be updated
28
- if "blur_option" in st.session_state:
29
- st.session_state.blur_option_checkbox = st.checkbox("NSFW画像にBlurをかける", key="blur_option", value=st.session_state.blur_option)
30
- st.session_state.pop("blur_option") # Remove the old value
31
-
32
- # Recreate the checkbox when its value needs to be updated
33
- if "blur_option" in st.session_state:
34
- st.session_state.blur_option_checkbox = st.checkbox("NSFW画像にBlurをかける", key="blur_option", value=st.session_state.blur_option)
35
- st.session_state.pop("blur_option") # Remove the old value
36
 
37
  # Initialize sort options
38
  if "sort_option" not in st.session_state:
 
19
  if "blur_option" not in st.session_state:
20
  st.session_state.blur_option = True
21
 
22
+ # Create a new checkbox
23
+ blur_option = st.checkbox("NSFW画像にBlurをかける", value=st.session_state.blur_option)
 
24
 
25
+ # ... (rest of the code remains unchanged)
 
 
 
 
 
 
 
 
 
26
 
27
  # Initialize sort options
28
  if "sort_option" not in st.session_state: