taka-yamakoshi
commited on
Commit
•
779710f
1
Parent(s):
2b404c9
tweak
Browse files
app.py
CHANGED
@@ -65,12 +65,13 @@ if __name__=='__main__':
|
|
65 |
mask_id = tokenizer('[MASK]').input_ids[1:-1][0]
|
66 |
|
67 |
st.write('1. Type in the sentences and click "Tokenize"')
|
68 |
-
sent_1 = st.
|
69 |
-
sent_2 = st.
|
70 |
-
if st.
|
71 |
st.session_state['page_status'] = 'tokenized'
|
72 |
st.session_state['sent_1'] = sent_1
|
73 |
st.session_state['sent_2'] = sent_2
|
|
|
74 |
|
75 |
if st.session_state['page_status']=='tokenized':
|
76 |
tokenizer,model = load_model()
|
|
|
65 |
mask_id = tokenizer('[MASK]').input_ids[1:-1][0]
|
66 |
|
67 |
st.write('1. Type in the sentences and click "Tokenize"')
|
68 |
+
sent_1 = st.text_input('Sentence 1',value='It is better to play a prank on Samuel than Craig because he gets angry less often.')
|
69 |
+
sent_2 = st.text_input('Sentence 2',value='It is better to play a prank on Samuel than Craig because he gets angry more often.')
|
70 |
+
if st.button('Tokenize'):
|
71 |
st.session_state['page_status'] = 'tokenized'
|
72 |
st.session_state['sent_1'] = sent_1
|
73 |
st.session_state['sent_2'] = sent_2
|
74 |
+
st.experimental_rerun()
|
75 |
|
76 |
if st.session_state['page_status']=='tokenized':
|
77 |
tokenizer,model = load_model()
|