Spaces:
Running
Running
remove debugging print
Browse files
app.py
CHANGED
|
@@ -151,7 +151,6 @@ def highlights_component(spans, show_alternatives, min_loss, show_all_on_hover=F
|
|
| 151 |
for span in spans:
|
| 152 |
show = span['token'] != span['most_likely_token'] and span['loss_ratio'] >= min_loss
|
| 153 |
alternative_to_show = next(token for token in span['topk_tokens'] if token != span['token'])
|
| 154 |
-
print(span['topk_tokens'])
|
| 155 |
show_alternative = show and show_alternatives
|
| 156 |
hover = f'<span class="alternative">{alternative_to_show}</span>'
|
| 157 |
html_out += '<span style="color: {color}" >{hover}{orig_token}</span>'.format(
|
|
|
|
| 151 |
for span in spans:
|
| 152 |
show = span['token'] != span['most_likely_token'] and span['loss_ratio'] >= min_loss
|
| 153 |
alternative_to_show = next(token for token in span['topk_tokens'] if token != span['token'])
|
|
|
|
| 154 |
show_alternative = show and show_alternatives
|
| 155 |
hover = f'<span class="alternative">{alternative_to_show}</span>'
|
| 156 |
html_out += '<span style="color: {color}" >{hover}{orig_token}</span>'.format(
|