Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -340,15 +340,15 @@ def PredictionsList():
|
|
| 340 |
tok_disp = display_token_from_id(tid)
|
| 341 |
tok_safe = html.escape(tok_disp) # protect the HTML label
|
| 342 |
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
|
| 353 |
w = HoverList()
|
| 354 |
w.items = items
|
|
|
|
| 340 |
tok_disp = display_token_from_id(tid)
|
| 341 |
tok_safe = html.escape(tok_disp) # protect the HTML label
|
| 342 |
|
| 343 |
+
label_html = (
|
| 344 |
+
f'<div class="rowbtn-grid">'
|
| 345 |
+
f' <span class="c0">{i}</span>'
|
| 346 |
+
f' <span class="c1">{prob}</span>'
|
| 347 |
+
f' <span class="c2">{tid}</span>'
|
| 348 |
+
f' <span class="c3">{tok_safe}</span>'
|
| 349 |
+
f'</div>'
|
| 350 |
+
)
|
| 351 |
+
items.append({"tid": tid, "label_html": label_html}) # <-- note label_html
|
| 352 |
|
| 353 |
w = HoverList()
|
| 354 |
w.items = items
|