summaryrefslogtreecommitdiff
path: root/candle-wasm-examples
diff options
context:
space:
mode:
Diffstat (limited to 'candle-wasm-examples')
-rw-r--r--candle-wasm-examples/whisper/src/worker.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/candle-wasm-examples/whisper/src/worker.rs b/candle-wasm-examples/whisper/src/worker.rs
index 139755cb..d77d3e32 100644
--- a/candle-wasm-examples/whisper/src/worker.rs
+++ b/candle-wasm-examples/whisper/src/worker.rs
@@ -159,10 +159,7 @@ impl Decoder {
}
sum_logprob += prob.ln();
}
- let text = self
- .tokenizer
- .decode(tokens.clone(), true)
- .map_err(E::msg)?;
+ let text = self.tokenizer.decode(&tokens, true).map_err(E::msg)?;
let avg_logprob = sum_logprob / tokens.len() as f64;
Ok(DecodingResult {