Spaces:
Running
Running
taka-yamakoshi
commited on
Commit
·
de2522a
1
Parent(s):
c1ec65f
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("<p style='text-align:
|
47 |
|
48 |
tokenizer = load_model('albert-xxlarge-v2')
|
49 |
sent_cols = st.columns(2)
|
@@ -64,11 +64,11 @@ if __name__=='__main__':
|
|
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:
|
71 |
if num_tokens[f'sent_1']==num_tokens[f'sent_2']:
|
72 |
-
st.markdown("<p style='text-align:
|
73 |
else:
|
74 |
-
st.markdown("<p style='text-align:
|
|
|
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; font-size:32px;'>Tokenizer Demo</p>", unsafe_allow_html=True)
|
47 |
|
48 |
tokenizer = load_model('albert-xxlarge-v2')
|
49 |
sent_cols = st.columns(2)
|
|
|
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; font-size:20px;'>{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; font-size:16px;'>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:MediumAquamarine; font-family:Arial; font-size:20px;'>Matched! </p>", unsafe_allow_html=True)
|
73 |
else:
|
74 |
+
st.markdown("<p style='text-align:center; color:Salmon; font-family:Arial; font-size:20px;'>Not Matched... </p>", unsafe_allow_html=True)
|