Spaces:
Runtime error
Runtime error
removed inexistent var
Browse files
pages/1_Disentanglement.py
CHANGED
@@ -59,17 +59,17 @@ with input_col_1:
|
|
59 |
# image_id = st.number_input('Image ID: ', format='%d', step=1)
|
60 |
st.write('**Choose a concept to disentangle**')
|
61 |
chosen_text_id_input = st.empty()
|
62 |
-
concept_id = chosen_text_id_input.text_input('Concept:',
|
63 |
|
64 |
-
|
65 |
random_text = st.form_submit_button('Select a random concept')
|
66 |
|
67 |
if random_text:
|
68 |
concept_id = random.choice(labels)
|
69 |
st.session_state.concept_id = concept_id
|
70 |
-
chosen_text_id_input.text_input('Concept:',
|
71 |
|
72 |
-
if
|
73 |
concept_id = str(concept_id)
|
74 |
st.session_state.concept_id = concept_id
|
75 |
# st.write(image_id, st.session_state.image_id)
|
|
|
59 |
# image_id = st.number_input('Image ID: ', format='%d', step=1)
|
60 |
st.write('**Choose a concept to disentangle**')
|
61 |
chosen_text_id_input = st.empty()
|
62 |
+
concept_id = chosen_text_id_input.text_input('Concept:', value=st.session_state.concept_id)
|
63 |
|
64 |
+
choose_text_button = st.form_submit_button('Choose the defined concept')
|
65 |
random_text = st.form_submit_button('Select a random concept')
|
66 |
|
67 |
if random_text:
|
68 |
concept_id = random.choice(labels)
|
69 |
st.session_state.concept_id = concept_id
|
70 |
+
chosen_text_id_input.text_input('Concept:', value=st.session_state.concept_id)
|
71 |
|
72 |
+
if choose_text_button:
|
73 |
concept_id = str(concept_id)
|
74 |
st.session_state.concept_id = concept_id
|
75 |
# st.write(image_id, st.session_state.image_id)
|