Spaces:
Runtime error
Runtime error
taka-yamakoshi
commited on
Commit
·
318a1a5
1
Parent(s):
7adf673
debug
Browse files
app.py
CHANGED
@@ -91,6 +91,7 @@ def annotate_options(sent_id,sent):
|
|
91 |
st.session_state[f'option_locs_{sent_id}'].append(word_id)
|
92 |
else:
|
93 |
st.session_state[f'option_locs_{sent_id}'].remove(word_id)
|
|
|
94 |
st.markdown(show_annotated_sentence(decoded_sent,
|
95 |
option_locs=st.session_state[f'option_locs_{sent_id}'],
|
96 |
mask_locs=st.session_state[f'mask_locs_{sent_id}']), unsafe_allow_html = True)
|
@@ -151,7 +152,7 @@ if __name__=='__main__':
|
|
151 |
sent_1 = st.session_state['sent_1']
|
152 |
sent_2 = st.session_state['sent_2']
|
153 |
|
154 |
-
st.write('2. Select options click "Confirm"')
|
155 |
annotate_options(1,sent_1)
|
156 |
annotate_options(2,sent_2)
|
157 |
if st.button('Confirm',key='option'):
|
|
|
91 |
st.session_state[f'option_locs_{sent_id}'].append(word_id)
|
92 |
else:
|
93 |
st.session_state[f'option_locs_{sent_id}'].remove(word_id)
|
94 |
+
st.write([st.session_state[f'option_locs_{sent_id}']])
|
95 |
st.markdown(show_annotated_sentence(decoded_sent,
|
96 |
option_locs=st.session_state[f'option_locs_{sent_id}'],
|
97 |
mask_locs=st.session_state[f'mask_locs_{sent_id}']), unsafe_allow_html = True)
|
|
|
152 |
sent_1 = st.session_state['sent_1']
|
153 |
sent_2 = st.session_state['sent_2']
|
154 |
|
155 |
+
st.write('2. Select options and click "Confirm"')
|
156 |
annotate_options(1,sent_1)
|
157 |
annotate_options(2,sent_2)
|
158 |
if st.button('Confirm',key='option'):
|