Update app.py
Browse files
app.py
CHANGED
|
@@ -155,8 +155,7 @@ html += """
|
|
| 155 |
animation-timing-function: steps(14, start);
|
| 156 |
animation-iteration-count: infinite;
|
| 157 |
text-decoration: underline;
|
| 158 |
-
text-decoration:
|
| 159 |
-
text-decoration: underline 0.3em;
|
| 160 |
text-decoration-skip: none;
|
| 161 |
text-decoration-skip-ink: none;
|
| 162 |
color: rgba(0, 0, 0, calc((50% + 50% * var(--p))));
|
|
@@ -180,13 +179,15 @@ for i in range(len(tokens[0])):
|
|
| 180 |
html += f"""
|
| 181 |
#sent0 span:nth-child({i+1}) {{"""
|
| 182 |
for j in range(len(tokens[1])):
|
| 183 |
-
|
|
|
|
| 184 |
html += """}"""
|
| 185 |
for j in range(len(tokens[1])):
|
| 186 |
html += f"""
|
| 187 |
#sent1 span:nth-child({j+1}) {{"""
|
| 188 |
for i in range(len(tokens[0])):
|
| 189 |
-
|
|
|
|
| 190 |
html += """}"""
|
| 191 |
html += """
|
| 192 |
body:has(#sent0:hover,#sent1:hover) span { --p: 0 !important; animation-play-state: paused; }"""
|
|
|
|
| 155 |
animation-timing-function: steps(14, start);
|
| 156 |
animation-iteration-count: infinite;
|
| 157 |
text-decoration: underline;
|
| 158 |
+
text-decoration-thickness: 0.3em;
|
|
|
|
| 159 |
text-decoration-skip: none;
|
| 160 |
text-decoration-skip-ink: none;
|
| 161 |
color: rgba(0, 0, 0, calc((50% + 50% * var(--p))));
|
|
|
|
| 179 |
html += f"""
|
| 180 |
#sent0 span:nth-child({i+1}) {{"""
|
| 181 |
for j in range(len(tokens[1])):
|
| 182 |
+
if token_probabilities_21[j][i] < 0.01: continue
|
| 183 |
+
html += f"""--ip{j}: {round(token_probabilities_21[j][i],2)}; """
|
| 184 |
html += """}"""
|
| 185 |
for j in range(len(tokens[1])):
|
| 186 |
html += f"""
|
| 187 |
#sent1 span:nth-child({j+1}) {{"""
|
| 188 |
for i in range(len(tokens[0])):
|
| 189 |
+
if token_probabilities_12[i][j] < 0.01: continue
|
| 190 |
+
html += f"""--p{i}: {round(token_probabilities_12[i][j],2)}; """
|
| 191 |
html += """}"""
|
| 192 |
html += """
|
| 193 |
body:has(#sent0:hover,#sent1:hover) span { --p: 0 !important; animation-play-state: paused; }"""
|