From e2eb5b4ee25fc69d25fc08966d83f3155e443d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20V=C3=B6lkel?= <konrad.voelkel@hhu.de> Date: Fri, 7 Mar 2025 15:17:05 +0100 Subject: [PATCH] minor changes --- modules/workerInterface.js | 7 +++---- styles.css | 27 ++++----------------------- worker.js | 7 ++++++- 3 files changed, 13 insertions(+), 28 deletions(-) diff --git a/modules/workerInterface.js b/modules/workerInterface.js index da49b70..8d37081 100644 --- a/modules/workerInterface.js +++ b/modules/workerInterface.js @@ -30,10 +30,9 @@ export function handleWorker(events){ bestAnswer[questions[i]] = bestTokens[i]; } - drawFeedbackButtons(query, bestAnswer); + drawUserInfo(); - - + /** pass our three results to ui so they can be displayed and worked with in chat */ results.forEach(result => { appendMessage( @@ -46,7 +45,7 @@ export function handleWorker(events){ result.answer ); }); - + drawFeedbackButtons(query, bestAnswer); /**discloseLimitations();*/ break; diff --git a/styles.css b/styles.css index 3d7cde2..9d7f811 100644 --- a/styles.css +++ b/styles.css @@ -221,8 +221,8 @@ .feedback-container { position: relative; - margin-left: auto; - left: -20px; + margin-right: auto; + right: -25px; color: #000; cursor: pointer; max-width: 10px; @@ -238,11 +238,11 @@ content: "Did the suggestions answer your question? Let us know."; position: absolute; max-width: 100px; - bottom: -50px; - right: 300%; + left: 200%; transform: translateX(20%); background-color: rgb(0, 0, 0, 0.8); color: white; + z-index: 1000; padding: 10px; border-radius: 4px; font-size: 14px; @@ -331,22 +331,3 @@ transform: translateY(0); } } - - - - - - - - - - - - - - - - - - - diff --git a/worker.js b/worker.js index 9930d39..3dfe4d0 100644 --- a/worker.js +++ b/worker.js @@ -20,8 +20,13 @@ self.onmessage = async function (event) { switch (act) { case 'initialize': - console.time("calcEmbeddings"); + + console.time("Model Loading Time"); await initializeModel(); + console.timeEnd("Model Loading Time"); + + console.time("calcEmbeddings"); + textData = newtextData; setCaches(embeddingStack, tokenEmbeddingStack); -- GitLab