Spaces:
Running
Running
add enzyme buttons
Browse files
app.py
CHANGED
@@ -10,29 +10,39 @@ ENTRY_METHODS = dict(
|
|
10 |
)
|
11 |
CRISPR_MODELS = ['Cas9', 'Cas12', 'Cas13d']
|
12 |
|
13 |
-
# Initialize a session state variable to track checkbox selection
|
14 |
-
if 'checkbox_selected' not in st.session_state:
|
15 |
-
st.session_state.checkbox_selected = None
|
16 |
|
17 |
selected_model = st.selectbox('Select CRISPR model:', CRISPR_MODELS, key='selected_model')
|
18 |
|
19 |
# Check if the selected model is Cas9
|
20 |
if selected_model == 'Cas9':
|
|
|
|
|
|
|
|
|
|
|
21 |
# Display checkboxes for the Cas9 model
|
22 |
if st.checkbox('SPCas9_U6', value=False, disabled=st.session_state.checkbox_selected not in [None, 'SPCas9_U6']):
|
23 |
-
st.session_state
|
|
|
|
|
24 |
pass
|
25 |
# Placeholder for action when SPCas9_U6 is clicked
|
26 |
elif st.checkbox('SPCas9_t7', value=False, disabled=st.session_state.checkbox_selected not in [None, 'SPCas9_t7']):
|
27 |
-
st.session_state
|
|
|
|
|
28 |
pass
|
29 |
# Placeholder for action when SPCas9_t7 is clicked
|
30 |
elif st.checkbox('eSPCas9', value=False, disabled=st.session_state.checkbox_selected not in [None, 'eSPCas9']):
|
31 |
-
st.session_state
|
|
|
|
|
32 |
pass
|
33 |
# Placeholder for action when eSPCas9 is clicked
|
34 |
elif st.checkbox('SPCas9_HF1', value=False, disabled=st.session_state.checkbox_selected not in [None, 'SPCas9_HF1']):
|
35 |
-
st.session_state
|
|
|
|
|
36 |
pass
|
37 |
# Placeholder for action when SPCas9_HF1 is clicked
|
38 |
elif selected_model == 'Cas12':
|
|
|
10 |
)
|
11 |
CRISPR_MODELS = ['Cas9', 'Cas12', 'Cas13d']
|
12 |
|
|
|
|
|
|
|
13 |
|
14 |
selected_model = st.selectbox('Select CRISPR model:', CRISPR_MODELS, key='selected_model')
|
15 |
|
16 |
# Check if the selected model is Cas9
|
17 |
if selected_model == 'Cas9':
|
18 |
+
# Boolean variables for each checkbox state
|
19 |
+
spcas9_u6 = st.checkbox('SPCas9_U6', key='spcas9_u6')
|
20 |
+
spcas9_t7 = st.checkbox('SPCas9_t7', key='spcas9_t7')
|
21 |
+
esp_cas9 = st.checkbox('eSPCas9', key='esp_cas9')
|
22 |
+
spcas9_hf1 = st.checkbox('SPCas9_HF1', key='spcas9_hf1')
|
23 |
# Display checkboxes for the Cas9 model
|
24 |
if st.checkbox('SPCas9_U6', value=False, disabled=st.session_state.checkbox_selected not in [None, 'SPCas9_U6']):
|
25 |
+
st.session_state['spcas9_t7'] = False
|
26 |
+
st.session_state['esp_cas9'] = False
|
27 |
+
st.session_state['spcas9_hf1'] = False
|
28 |
pass
|
29 |
# Placeholder for action when SPCas9_U6 is clicked
|
30 |
elif st.checkbox('SPCas9_t7', value=False, disabled=st.session_state.checkbox_selected not in [None, 'SPCas9_t7']):
|
31 |
+
st.session_state['spcas9_u6'] = False
|
32 |
+
st.session_state['esp_cas9'] = False
|
33 |
+
st.session_state['spcas9_hf1'] = False
|
34 |
pass
|
35 |
# Placeholder for action when SPCas9_t7 is clicked
|
36 |
elif st.checkbox('eSPCas9', value=False, disabled=st.session_state.checkbox_selected not in [None, 'eSPCas9']):
|
37 |
+
st.session_state['spcas9_u6'] = False
|
38 |
+
st.session_state['spcas9_t7'] = False
|
39 |
+
st.session_state['spcas9_hf1'] = False
|
40 |
pass
|
41 |
# Placeholder for action when eSPCas9 is clicked
|
42 |
elif st.checkbox('SPCas9_HF1', value=False, disabled=st.session_state.checkbox_selected not in [None, 'SPCas9_HF1']):
|
43 |
+
st.session_state['spcas9_u6'] = False
|
44 |
+
st.session_state['spcas9_t7'] = False
|
45 |
+
st.session_state['esp_cas9'] = False
|
46 |
pass
|
47 |
# Placeholder for action when SPCas9_HF1 is clicked
|
48 |
elif selected_model == 'Cas12':
|