taka-yamakoshi commited on
Commit
c1ec65f
·
1 Parent(s): c4a27b1
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -43,7 +43,7 @@ if __name__=='__main__':
43
  st.markdown(hide_table_row_index, unsafe_allow_html=True)
44
 
45
  # Title
46
- st.markdown("<h1 style='text-align: center; color: black;'>Tokenizer</h1>", unsafe_allow_html=True)
47
 
48
  tokenizer = load_model('albert-xxlarge-v2')
49
  sent_cols = st.columns(2)
@@ -63,12 +63,12 @@ if __name__=='__main__':
63
  #for word_col,word in zip(word_cols,decoded_sent):
64
  #with word_col:
65
  #st.write(word)
66
- st.write(' '.join(decoded_sent))
67
- st.write(f'{len(decoded_sent)} tokens')
68
 
69
  if len(sents['sent_1'])>0 and len(sents['sent_2'])>0:
70
- st.markdown("<h2 style='text-align: center; color: black;'>Result&colon </h2>", unsafe_allow_html=True)
71
  if num_tokens[f'sent_1']==num_tokens[f'sent_2']:
72
- st.markdown("<h2 style='text-align: center; color: red;'>Matched! </h2>", unsafe_allow_html=True)
73
  else:
74
- st.markdown("<h2 style='text-align: center; color: red;'>Matched! </h2>", unsafe_allow_html=True)
 
43
  st.markdown(hide_table_row_index, unsafe_allow_html=True)
44
 
45
  # Title
46
+ st.markdown("<p style='text-align: center; color: black;font-family:Arial;'>Tokenizer Demo</p>", unsafe_allow_html=True)
47
 
48
  tokenizer = load_model('albert-xxlarge-v2')
49
  sent_cols = st.columns(2)
 
63
  #for word_col,word in zip(word_cols,decoded_sent):
64
  #with word_col:
65
  #st.write(word)
66
+ st.write(' '.join(decoded_sent))
67
+ st.markdown(f"<p style='text-align: center; color: black; font-family:Arial;'>{len(decoded_sent)} tokens </p>", unsafe_allow_html=True)
68
 
69
  if len(sents['sent_1'])>0 and len(sents['sent_2'])>0:
70
+ st.markdown("<p style='text-align: center; color: black; font-family:Arial;'>Result&colon; </p>", unsafe_allow_html=True)
71
  if num_tokens[f'sent_1']==num_tokens[f'sent_2']:
72
+ st.markdown("<p style='text-align: center; color: red; font-family:Arial;'>Matched! </p>", unsafe_allow_html=True)
73
  else:
74
+ st.markdown("<p style='text-align: center; color: red; font-family:Arial;'>Not Matched... </p>", unsafe_allow_html=True)