Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
8cb97ec
1
Parent(s):
5c7f5a5
Update app.py
Browse files
app.py
CHANGED
@@ -244,13 +244,14 @@ def classify_tokens(text):
|
|
244 |
color = color_dict.get(label, "#D3D3D3")
|
245 |
|
246 |
table_html += "<tr>"
|
247 |
-
table_html +=
|
|
|
|
|
248 |
table_html += (
|
249 |
f"<td style='border: 1px solid #ccc; padding: 6px; background-color: {color};'>{label}</td>"
|
250 |
)
|
251 |
table_html += f"<td style='border: 1px solid #ccc; padding: 6px;'>{score}</td>"
|
252 |
table_html += "</tr>"
|
253 |
-
|
254 |
table_html += "</table>"
|
255 |
|
256 |
return styled_html, table_html
|
|
|
244 |
color = color_dict.get(label, "#D3D3D3")
|
245 |
|
246 |
table_html += "<tr>"
|
247 |
+
table_html += (
|
248 |
+
f"<td style='border: 1px solid #ccc; padding: 6px; background-color: {color};'>{token}</td>"
|
249 |
+
)
|
250 |
table_html += (
|
251 |
f"<td style='border: 1px solid #ccc; padding: 6px; background-color: {color};'>{label}</td>"
|
252 |
)
|
253 |
table_html += f"<td style='border: 1px solid #ccc; padding: 6px;'>{score}</td>"
|
254 |
table_html += "</tr>"
|
|
|
255 |
table_html += "</table>"
|
256 |
|
257 |
return styled_html, table_html
|