From 9571b200c9a7c835f66a5444e62f8100e99a4102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radam=C3=A9s=20Ajna?= Date: Tue, 26 Sep 2023 22:01:59 -0700 Subject: [PATCH] fix firstToken, minor ui changes (#971) --- .../llama2-c/lib-example.html | 190 +++++++++--------- .../llama2-c/llama2cWorker.js | 11 +- 2 files changed, 101 insertions(+), 100 deletions(-) diff --git a/candle-wasm-examples/llama2-c/lib-example.html b/candle-wasm-examples/llama2-c/lib-example.html index d832aa13..9b78ebde 100644 --- a/candle-wasm-examples/llama2-c/lib-example.html +++ b/candle-wasm-examples/llama2-c/lib-example.html @@ -117,6 +117,10 @@ llamaWorker.removeEventListener("message", handleMessage); reject(new Error(error)); } + if (status === "aborted") { + llamaWorker.removeEventListener("message", handleMessage); + resolve(event.data); + } if (status === "complete") { llamaWorker.removeEventListener("message", handleMessage); resolve(event.data); @@ -212,8 +216,7 @@ + value="Once upon a time" /> -
- - - - 200 - - - - 0.50 - - - - 1.00 +
+ Advanced Options +
+ + + + 200 + + + + 0.40 + + + + 1.00 - + - - 1.10 - - - -
+ + 1.10 + + + +
+

Generation:

+ class="min-h-[250px] bg-slate-100 text-gray-500 p-4 rounded-md flex flex-col gap-2"> + class="ml-auto font-semibold grid-rows-1 text-sm">
No output yet