Commit
·
4df8d75
1
Parent(s):
59752f1
- tabs/comparison.py +3 -3
tabs/comparison.py
CHANGED
@@ -53,7 +53,7 @@ def comparison_tab(df):
|
|
53 |
st.write(f"**Tokens/Character Ratio:** {metrics['Tokens/Character Ratio']:.4f}")
|
54 |
tokenizer = get_tokenizer(model_1)
|
55 |
tokens = tokenizer.tokenize(input_text)
|
56 |
-
tokens_html = ' '.join([f'<span style="background-color: #
|
57 |
st.markdown(f'<div style="line-height: 2.5;">{tokens_html}</div>', unsafe_allow_html=True)
|
58 |
|
59 |
with col2:
|
@@ -72,5 +72,5 @@ def comparison_tab(df):
|
|
72 |
st.write(f"**Tokens/Character Ratio:** {metrics['Tokens/Character Ratio']:.4f}")
|
73 |
tokenizer = get_tokenizer(model_2)
|
74 |
tokens = tokenizer.tokenize(input_text)
|
75 |
-
tokens_html = ' '.join([f'<span style="background-color: #
|
76 |
-
st.markdown(f'<div style="line-height: 2.5;">{tokens_html}</div>', unsafe_allow_html=True)
|
|
|
53 |
st.write(f"**Tokens/Character Ratio:** {metrics['Tokens/Character Ratio']:.4f}")
|
54 |
tokenizer = get_tokenizer(model_1)
|
55 |
tokens = tokenizer.tokenize(input_text)
|
56 |
+
tokens_html = ' '.join([f'<span style="background-color: #00BFFF; padding: 2px 5px; margin-right: 5px; border-radius: 3px;">{token}</span>' for token in tokens])
|
57 |
st.markdown(f'<div style="line-height: 2.5;">{tokens_html}</div>', unsafe_allow_html=True)
|
58 |
|
59 |
with col2:
|
|
|
72 |
st.write(f"**Tokens/Character Ratio:** {metrics['Tokens/Character Ratio']:.4f}")
|
73 |
tokenizer = get_tokenizer(model_2)
|
74 |
tokens = tokenizer.tokenize(input_text)
|
75 |
+
tokens_html = ' '.join([f'<span style="background-color: #FF1493; padding: 2px 5px; margin-right: 5px; border-radius: 3px;">{token}</span>' for token in tokens])
|
76 |
+
st.markdown(f'<div style="line-height: 2.5;">{tokens_html}</div>', unsafe_allow_html=True)
|