Try a smaller node image
This commit is contained in:
parent
1142f11724
commit
29f2c0d869
@ -1,4 +1,4 @@
|
|||||||
FROM node:20-alpine
|
FROM node:20-bookworm-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
@ -66,6 +66,7 @@ function cosineSimilarity(a, b) {
|
|||||||
|
|
||||||
async function initModel() {
|
async function initModel() {
|
||||||
extractor = await pipeline("feature-extraction", "Xenova/all-MiniLM-L6-v2");
|
extractor = await pipeline("feature-extraction", "Xenova/all-MiniLM-L6-v2");
|
||||||
|
console.log("MiniLM model loaded");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function embed(text) {
|
async function embed(text) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user