Spaces:
Sleeping
Sleeping
山越貴耀
commited on
Commit
·
444f39b
1
Parent(s):
022cb46
fix word index
Browse files
app.py
CHANGED
@@ -167,7 +167,7 @@ def show_changed_site():
|
|
167 |
prev_step_id = st.session_state.prev_step_id
|
168 |
curr_sent = df.cleaned_sentence.loc[step_id].split(' ')
|
169 |
prev_sent = df.cleaned_sentence.loc[prev_step_id].split(' ')
|
170 |
-
locs = [df.next_sample_loc.to_list()[step_id-1]] if 'next_sample_loc' in df else (
|
171 |
[i for i in range(len(curr_sent)) if curr_sent[i] not in prev_sent]
|
172 |
)
|
173 |
disp_style = '"font-family:san serif; color:Black; font-size: 20px"'
|
@@ -261,7 +261,7 @@ if __name__=='__main__':
|
|
261 |
if 'step_id' not in st.session_state:
|
262 |
st.session_state.prev_step_id = 0
|
263 |
st.session_state.step_id = 0
|
264 |
-
|
265 |
|
266 |
explore_type = st.sidebar.radio(
|
267 |
'2. Choose how to explore the chain',
|
|
|
167 |
prev_step_id = st.session_state.prev_step_id
|
168 |
curr_sent = df.cleaned_sentence.loc[step_id].split(' ')
|
169 |
prev_sent = df.cleaned_sentence.loc[prev_step_id].split(' ')
|
170 |
+
locs = [df.next_sample_loc.to_list()[step_id-1]]-1 if 'next_sample_loc' in df else (
|
171 |
[i for i in range(len(curr_sent)) if curr_sent[i] not in prev_sent]
|
172 |
)
|
173 |
disp_style = '"font-family:san serif; color:Black; font-size: 20px"'
|
|
|
261 |
if 'step_id' not in st.session_state:
|
262 |
st.session_state.prev_step_id = 0
|
263 |
st.session_state.step_id = 0
|
264 |
+
|
265 |
|
266 |
explore_type = st.sidebar.radio(
|
267 |
'2. Choose how to explore the chain',
|