taka-yamakoshi
commited on
Commit
·
633647b
1
Parent(s):
c8e743e
fix mask token
Browse files
app.py
CHANGED
@@ -219,7 +219,7 @@ if __name__=='__main__':
|
|
219 |
if st.session_state['page_status']!='model_selection':
|
220 |
tokenizer,model,skeleton_model = load_model(st.session_state['model_name'])
|
221 |
num_layers, num_heads = model.config.num_hidden_layers, model.config.num_attention_heads
|
222 |
-
mask_id = tokenizer(
|
223 |
|
224 |
if st.session_state['page_status']=='type_in':
|
225 |
show_instruction('1. Type in the sentences and click "Tokenize"',fontsize=16)
|
|
|
219 |
if st.session_state['page_status']!='model_selection':
|
220 |
tokenizer,model,skeleton_model = load_model(st.session_state['model_name'])
|
221 |
num_layers, num_heads = model.config.num_hidden_layers, model.config.num_attention_heads
|
222 |
+
mask_id = tokenizer(tokenizer.mask_token).input_ids[1:-1][0]
|
223 |
|
224 |
if st.session_state['page_status']=='type_in':
|
225 |
show_instruction('1. Type in the sentences and click "Tokenize"',fontsize=16)
|