summaryrefslogtreecommitdiff
path: root/candle-wasm-examples/llama2-c/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'candle-wasm-examples/llama2-c/src/app.rs')
-rw-r--r--candle-wasm-examples/llama2-c/src/app.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-wasm-examples/llama2-c/src/app.rs b/candle-wasm-examples/llama2-c/src/app.rs
index a2307471..2ecd771e 100644
--- a/candle-wasm-examples/llama2-c/src/app.rs
+++ b/candle-wasm-examples/llama2-c/src/app.rs
@@ -116,6 +116,7 @@ impl Component for App {
let start_time = performance_now();
self.current_decode = Some(CurrentDecode { start_time });
self.status = "generating...".to_string();
+ self.n_tokens = 0;
self.generated.clear();
let temp = *self.temperature.borrow();
console_log!("temp: {}", temp);
@@ -159,7 +160,6 @@ impl Component for App {
}
Msg::WorkerInMsg(inp) => {
self.worker.send(inp);
- self.n_tokens = 0;
true
}
Msg::UpdateStatus(status) => {