Spaces:
Running
Running
taka-yamakoshi
commited on
Commit
·
c1ec65f
1
Parent(s):
c4a27b1
fix text
Browse files
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("<
|
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('
|
67 |
-
st.
|
68 |
|
69 |
if len(sents['sent_1'])>0 and len(sents['sent_2'])>0:
|
70 |
-
st.markdown("<
|
71 |
if num_tokens[f'sent_1']==num_tokens[f'sent_2']:
|
72 |
-
st.markdown("<
|
73 |
else:
|
74 |
-
st.markdown("<
|
|
|
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: </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)
|