Skip to content
Snippets Groups Projects

Error in _valid_image_format

Merged Yoann Schneider requested to merge fix-valid-image-format into main
Files
7
@@ -272,7 +272,7 @@ def parse_ner_predictions(
return [
{
"text": f"{text[current: next_token]}".replace("\n", " "),
"confidence_ner": f"{np.around(np.mean(char_confidences[current : next_token]), 2)}",
"confidence": np.round(np.mean(char_confidences[current:next_token]), 2),
}
for current, next_token in predictions
]
@@ -363,7 +363,7 @@ def process_batch(
+ [None]
)
result["confidences"]["by ner token"] = parse_ner_predictions(
result["confidences"]["ner"] = parse_ner_predictions(
text, char_confidences, indices
)
Loading