Skip to content

Commit

Permalink
Bug 1918220 - replace T output a=pascalc
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekziade committed Sep 13, 2024
1 parent a7a2007 commit 03b71d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions toolkit/components/ml/content/ONNXPipeline.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ async function imageToText(request, model, tokenizer, processor, _config) {
}
lazy.console.debug("Inference done in ", Date.now() - start);
result.output = toReturn[0][0].generated_text;

// Bug 1918220 - replace the result for models with that bug
if (result.output === "T") {
lazy.console.debug("Replacing `T` with `Text document.`");
result.output = "Text document.";
}
return result;
}

Expand Down

0 comments on commit 03b71d3

Please sign in to comment.